Is this possible?

Would it be possible (Without being extremely inefficient) to loop through a display object and reset their children’s ChildIndex based on their y value?