NPC Code:
setarray XY,lenght; // define array
for ( i = 0 ; i < lenght * 2 ; i += 2){ // for loop with step of 2
XY[i + 0] = Whatever; // x value
XY[i + 1] = Whatever; // y value
}
// You could easily add as many variables as you like to an array this way.
This is basically how I do it.
I been using arrays for a long time. This works.