If I was setting this up I think it would look something like this:
// if I'm going to end up adding more images to an array, I tend not to define the array as a fixed size, since I will have to write out individual filenames anyway.
// Personally, I find it better to use an array declaration like this:
imgs = [
loadImage("filename_1"),
loadImage("filename_2"),
loadImage("filename_3")
]
With this setup, we don't need to write imgs[3] = loadImage() every time we want to add something. Just add another element like this:
imgs = [
loadImage("filename_1"),
loadImage("filename_2"),
loadImage("filename_3"),
loadImage("filename_4") // the new element
]
That should (pretty much) always take place outside of your main loop. Otherwise, you're declaring an array once per frame.
Since each element of the array is a handle, there's no need to use a separate handle variable when drawing:
for i = 0 to len(imgs) loop // this loops over each element in the imgs array
drawImage(imgs[i], 300 * i, gheight() / 2) // just using an example for the x and y positions.
repeat