I'm trying to make a map editor and i need to save information from objects to array. How can i loop through every object and insert their x and y positions and other values to their own slots in array?

A UID is assigned to every object (text, sprite, mouse and keyboard, etc...) and every behavior. Say you have a cap with only one "Sprite" with a "drag and drop" behavior. The Sprite will have a UID of 0, and it's behavior "drag and drop" will have a UID of 1. So if you then add another instance of Sprite it's UID will be 2.