Iterate through the group members changing the position of each element to be that of the element that came before it in the array (or after it if direction = 1)
The first group member position is set to x/y.
The x coordinate to place the first item in the array at.
The y coordinate to place the first item in the array at.
The iteration direction. 0 = first to last and 1 = last to first.
This Group object.