Ok, it's immediately clear what the problem is now. You're not using an array. You're CREATING an array at the start, but then you're changing it into a normal variable the instant the scanner hits the object. Here's a way to do what you want:
Create Event
Code:
inst_no = instance_number(obj_orbiter1); // Get how many instances of the object there are
for (var i=0;i<inst_no;i++) { // Loop through that number
var inst = instance_find(obj_orbiter1,i); // Get the instance ID of each instance as we go through the for loop
xpos[i] = inst.x; // Store the coordinates of the current instance in two arrays
ypos[i] = inst.y;
}
Then, in the Room Start event, you can put this (we only need to check if it's rm_test at the start of the room, not every step, hence why we are using the Room Start event):
Code:
if (room == rm_test) {
for (var i=0;i<inst_no;i++) { // Loop through how many instances we counted at the start.
instance_create_layer(xpos[i],ypos[i],"instances",obj_orbiter1); // Create an instance at the correct positions
}
}
I'm not entirely sure why you thought you could save an array without an index (the index is the position within the array you are saving or reading from). In the above example if you tried to read xpos[0] you would get the x position of the first instance the code found in the for loop, if you tried to read xpos[1] you would get the x position of the second instance and so on. You should read the manual on arrays.
As a sidenote, when you start trying to get this working on more than one object, you should look into the concept of Parenting within GM.