Well again, there are hundreds of way to do it, and yes you can create your personal array to store the squad composition, however if you use the folder-structure, keep in mind the the function parentnode.getchildren() already returns an array containing the nodes below it.
The easiest solution is to create a
swap_player function that is called when a player is dragged and release on top of another, that both move the player and re-calculate the stats of the entire squad. Something like:
func swap_player(dragged_player, old_player, squad):
func calculate_stats(): #inside squad node script
for role in get_children():
for player in role.get_children():