Provided the top level conditions are correct this event will run continuously every tick. I think what you want is a triggered event, or more likely a function to run this inside of.
Hard to tell anymore looking at the code. It looks overly complex for what you are trying to describe. An array does not seem to be necessary.
On your selection screen you could use something like:
On gamepad 0 button (whatever your select button is) is pressed
Pick CharacterSprite overlapping CursorSprite0
- Set var_P1 to CharacterSprite.var_name
On gamepad 1 button (whatever your select button is) is pressed
Pick CharacterSprite overlapping CursorSprite1
- Set var_P2 to CharacterSprite.var_name
etc.
If you don't want to store them in variables I would use a dictionary and instead of:
- Set var_P1 to CharacterSprite.var_name use - Dictionary SetKey "P1" to CharacterSprite.var_name
Arrays are more useful when you need to manipulate the data within them. If you just need to store values Dictionaries are much easier.