Local fullimages:TImage = LoadImage("test.png")
Local tile:TPixmap[10] 'defines the number of elements
tile[1] = GrabPixmap(0,0,20,20) 'puts pixmap into element 1
Note that arrays are 0 based, which means a 10 element array is indexed from 0-9. If you want to index from 1-10 instead, you would need to either subtract 1 form index (tile[i-1]) or create an 11 element array and just ignore element 0 (Global tile:TPixmap[11]).
Another thing, drawing pixmaps to the screen is far slower than images, it is better to either initialize the array to several blank images, then GrabImage to the array,
Local fullimages:TImage = LoadImage("test.png")
Local tile:TImage[10]
For Local i:int = 0 to 9
tile[i] = CreateImage(20,20)
Next
DrawImage fulltiles,0,0
tile[1] = GrabImage(0,0)
DrawImage tile[1],250,10
or use LoadAnimImage and just specify the frame.
Local fulltiles:TImage = LoadAnimImage("test.png",20,20,0,10)
DrawImage fulltiles,250,10,1
Another thing, it is best to avoid Global unless you have a very specific reason to use them.