For my case I changed the Map into an Array of Structure (in above example that would be of “TopLayer”), and inside the structure I added an int to act as the index from the former Map.
Like this I can get a reference from the array when the int/index from the structure has the value is given, and add into the array with that ref.
There is no need for a Map anymore that way. I wanted to use that as I would have had a better structure for the code, but it is fine this way as well. In my case I’m not working with huge amount of data, so the speed of Map->Find wouldn’t be that much faster then going through the array with break to actually notice anyway.
Thanks for your time!