Rotates the elements of an array in place. Supports rotation in both directions and automatically wraps rotations which are larger than the input array size.