Replicating TMaps, what are my options?

I think the reason TMap cannot be replicated is it is optimized for key lookup speed, which means the order of the keys potentially changes every time you add/remove/modify a key.

If runtime lookup speed is your primary concern, you could potentially create a duplicated TArray of structs that only exists purely for the sake of replication, and essentially every time you modify your TMap you also modify the TArray, and then on the client when the TArray changes replicate, you update both it and the TMap on the client side. The struct would contain both the map key and its value.

The benefit of this approach is you keep your runtime lookup efficiency, at the cost of double the RAM and a bit of extra CPU when you modify the TMap contents. The network bandwidth would be optimized since only key/value changes would replicate.