Sure... this is pretty easy, actually.
First, you need to create a structure using mxCreateStructMatrix(). This
defines the shape, and the field names, but not the actual data.
Second, create an array that you want to place in the structure, for example
mxCreateCellMatrix(), or mxCreateDoubleMatrix(). (I think those names are
Third, associate those arrays as data in the structure, using mxSetField().
Repeat Second and Thord steps until your structure is completely populated.
These is no need to populated 'empty' fields.
Cells arrays are created in much the same way.
This procedure can be performed recursively, to created nested constructs.
The 'cstruct' package on the File Exchange is a (perhaps confusing) example
of a recursive implemention of such.