in reply to Rotating an array

What I would do is to define a class which owns the array data and which will return any element that you want. Behind the scenes, it applies a numeric offset (default: 0) to the requested coordinate, modulo the size. Thus, you do not "move" the data at all.