Well with your current setup after you move things around in your array, you’d want to loop over the array, pick the objects by uid and update the position from the array.
If that doesn’t make sense then maybe you want to move and wrap those objects around in another way?
One possible way works if those five instances are the only instances of that object type and you places them in the editor from left to right.
You’d then add an instance variable “oldx” to the object type and you’d swap the positions of all the instances to the one on the right (or rightmost with leftmost) with:
On key pressed
— sprite: set oldx to self.x
— sprite: set x to sprite(self.iid+1).oldx
To move left instead you’d replace the +1 with -1.
Or you could do something else entirely.