The combat is essentially a row of static monsters faced off against a row of static player characters. Each character (player or enemy) takes a turn in 'rounds'. At the completion of each round, the process starts over (quite original, I know...).
I am using an array to store data for each PC and enemy. For example: arrayPC1. I am now attempting to figure out how to construct an attack function that can be reused everywhere (seems pretty important for an RPG). The problem I am having is that I can't predict which 'slot' a character will choose to attack. So PC1 might decide to attack Enemy1, 2, or 3 and the correct array would need to referenced in the function in any of those cases. Here is a visual example to try and help explain:

So, how do I tell the function which of these slots to pull data from when it is calculating an attack?
Thanks in advance for helping out a noob...