In Fortran I can easily specify a 3D array, where array elements contain other kind of variables(real, integer, logical, vector, etc) This is very effivcient and conveniet. An example is below:
all that works, and we expect if there are many strings for indicies we expect mathematica employs at least a binary search to cross reference the value
I need this indirect referencing because then I do not have to keep in mind in which position an element in the list is. E.g. activeind = 3 , so I can referrence an active / inactive 3D grid property easily by gblock[[ j, i, k, activeind]] = True (or False) . (The Dollar sign was removed from activeind.) I’m actually transfering an older Fortran code of mine into the Wolfram Language, and this seemed to me the easiest way to do it. In Fortran I do the same this way:
GBLOCK(J,I,K).ACTIVE = .TRUE. (or .FALSE.)
If there is a more efficient way, I would be gratefuly to learn it.
As an alternative you could make an array of associations. And use the associations keys to access the elements.
In the attachment I have made an adaption of your notebook.