First you can use GetControls("") to get all the controls.
Using the fact that panels controls can't be nested you can use the following code (it will add all controls on Form1 to the ArrayList named al1).
Code:
Sub Globals
'Declare the global variables here.
Dim crl(0),tmp(0)
End Sub
Sub App_Start
Form1.Show
AddArrayList("al1")
crl() = GetControls("Form1")
For i = 0 To ArrayLen(crl())-1
al1.Add(crl(i))
If ControlType(crl(i)) = "Panel" Then
tmp() = GetControls(crl(i))
For x = 0 To ArrayLen(tmp())-1
al1.Add(tmp(x))
Next
End If
Next
'Show the controls
For i = 0 To al1.Count-1
Msgbox(al1.Item(i))
Next
End Sub