One other option on the scheme of "variable size element in a struct" is if you just add all the array sizes together, and then make one long array.
Let's say you have 10 of array a, then 100 of the array b and c.
So on the one side, you fill in 0-9 with the contents of a, then 10-109 with b, then 110-209 with c.
On the "other side", you fetch the data out by:
a = &array;
b = &array;
c = &array;