Well, you define a panel as usual. Then you define an array - as usual as well. My C-Script is a bit rusty, but it should be something like this:
The you can assign your panels to the array.
mypanels[0] = my_first_panel;
mypanels[1] = my_second_panel;
// etc.
Finally you can read them out of the array.
PANEL* p;
p = mypanels[0];
p.visible = off;
Just put that last code fragment in a loop.