Help in understanding efficiently handling multidimensional arrays

Thanks for the help!

I considered a vector of matrices, but after some googling I found some performance metrics indicating it is slower than using 3D arrays. (Speed is mostly what I care about for my use case, which is why I will probably avoid the view). I guess I could still try and see which performs better in my code.

Your third method is so far the cleanest and yet still efficient that I have now, though I remain hopeful that a similar syntax could get the efficiency of my third approach, which should still be the fastest.