If we know tuples
is constructed from 3
grids, we can extract the lengths using:
lF = Map[l |-> Total @ Normalize[#, Min]& @ GroupBy[#, #[[l]]& -> Most, Length]]&
ngrids = 3;
lengths = lF[tuples] @ Range[ngrids]
{6, 6, 5}
Then, we can use a combination of ArrayReshape
and Extract
to get the three grids:
reshaped = ArrayReshape[tuples, Append[Length @ First @ tuples] @ lengths];
positions = Map[{Splice @ RotateRight[{1, 1, All}, #], #} &] @ Range[ngrids];
Extract[reshaped, positions]
% == {grid1, grid2, grid3}
True