Another option:
If you need to create wrapping behaviour and want to avoid a loop, with modulus you can create "wrapping" behaviour.
Essentially split the array in two and swap the start and end. What defines the offset is where you put the split.
int a[] = array(0,1,2,3,4,5,6);
int i = len(a);
// offset value
int offset = 1;
int out[] = a[offset%i:i+1];
append(out,a[0:offset%i]);
i[]@out = out;