Without an idea of your knowledge of blueprint, guess a generic way could be:
- One of the characters or a third class is needed to have a reference to all actors with the data to merge.
- Iterate the references to append each to a new array or an existing one.
- swap the indexes using your favorite sorting algorithm.
And of course do all this inside a function.
If a third class is used there is also the option to get the array using an interface to avoid the include of the character class.
Here are some useful links:
- https://www.youtube.com/watch?v=RwbkvUEgCls
- Array Nodes | Unreal Engine 4.27 Documentation
- Optimizing TArray Usage for Performance - Unreal Engine
Hope it helps. Let me know if you need anything specific.