Working with flattened 3d arrays in BP

hey everyone!
UE4 newbie here!
I’m trying to build my first blueprint (trying to make a flattened 3d int array for a sort of random dungeon generator)
so I started with this video as my reference Blueprint Generating Procedural Rooms | Live Training | Unreal Engine - YouTube and I managed to do this

which got me a nice cube made out of cubes

my problem is that I am terrible at math and I’m making the flattened 3d array version of those cubes with random examples I found on the web.
I think I found the algorithm (not entirely sure it is right) for indexing the cubes in the array

but now I need to get the XYZ just with the array’s index and here’s where I get lost :frowning:

so if anyone could point me to any examples or just throw any advice I would greatly apreciate it!

maybe use 2 arrays. One with the location of the cube and one with the other info you want to store.
For example. Cube: get location insert to array “location” and get cubeinfo: add to array "cubeinfo.
Maybe this will help.

you can see this video Unreal Engine 4 - ARRAY 3D - YouTube