Not necessarily!
You could also use a var array and a temp panel pointer:
var myPanels[50];
panel* temp_pan;
Now save the panels at a certain position and hand the id of that position over to the move function which will set the temp_pan pointer each frame to the panel at that position and move it then using the temp_pan pointer.