if you want it in a function like you suggested, try this.
function array_switch(var* array1, var* array2, var LEN)
{
var idx;
for(idx=0; idx<LEN; idx++)
array1[idx] = array2[idx]; //make array1 = array2
}
you need to add the "len" parameter if the array is ever going to be
other than 6 elements, otherwise you could hard-code it.
You would use it like this
if (temp_defender == player1) {array_switch(temp_defender_stats, player1_stats,6);}
so if temp_defender==player1 then the temp_defender_stats will be replaced
by a copy of player1_stats.