I have no understanding of python - here's how to do it via events.
Set the values at array's x, y to the character's stats. Like the stuff in column x1 is for character 1, column x2 is character 2, etc.
So set value at x:1 y:1 Charater 1's hp
Set value at x:1 y:2 Character 1's mp
Somewhere else, have a few slots on the array available to tell who's currently in the party.
Upon adding a character to the party, set the slot in the array to their name.
Set value at x, y to: "Character 1"
At the start of battle:
At start of layout
Array: value at x, y is equal to "Character 1"
Removing a character:
Set value at x, y to: "None"
Important! There's currently a bug in the array that retrieving values from either x1 or y1 doesn't work correctly, I can't remember which. Start at x2/y2 and it should work. You also might need to increase the side of the array, done in its properties.