I have an algorithm that creates instances of objects in 3d space, to avoid double placement i have to loop through all of them for each instance to find out if an instance has the same id as an already existing one.
My dream solution would be a 3 dimensional array that i can reference via x y z coordinates. However I guess it is impossible due to ram restrictions.
So i was wondering if there is something like a "broken" array that i can still reference via Array[x][y][z], but works like a list, so if that specific x y z was never declared, it just doesnt exist and thus doesnt fill up the ram.
I'd highly appreciate if someone could point me in the right direction to what I am actually looking for and maybe even provide some code example of how to implement it.