Horizental list

I have created a list of objects but I don’t know how to move them using the mouse in the axis direction so that if it goes out of the scene object it returns to the beginning of the list like this link.
can you guide me?