I'ld just use the 8bit table write/play modules as a template for modifying.
eg.
if you have an 8bit array like, you can make a "multitrack" of it by doing:
int8_t array[4][4][64];
in which case you have 4 arrays of 64 length for note, velocity, aftertouch and bend(8bit) (first is track, second is type, third is value).
to write it you could do:
if(inlet_rec1>0){
attr_table.array[0][0][writepos]=inlet_vel1>>20;
attr_table.array[0][1][writepos]=(inlet_note1>>20)+64;
attr_table.array[0][2][writepos]=inlet_after1>>20;
attr_table.array[0][3][writepos]=inlet_bend1>>20;
}
if(inlet_rec2>0){
attr_table.array[1][0][writepos]=inlet_vel2>>20;
attr_table.array[1][1][writepos]=(inlet_note2>>20)+64;
attr_table.array[1][2][writepos]=inlet_after2>>20;
attr_table.array[1][3][writepos]=inlet_bend2>>20;
}
etc..
to read it you could do:
vel1=attr_table.array[0][0][readpos]; (whenever velocity goes high, it means gate goes on and the first high value is held, 0 is off)
pitch1=attr_table.array[0][1][readpos];
after1=attr_table.array[0][2][readpos];
bend1=attr_table.array[0][3][readpos];
vel2=attr_table.array[1][0][readpos];
pitch2=attr_table.array[1][1][readpos];
after2=attr_table.array[1][2][readpos];
bend=attr_table.array[1][3][readpos];
etc.
you could also combine this with the code of the midi note module to make the recording polyphonic by keeping track of which notes are (still) open/closed and whether an array is already playing a note (forcing it to record to the next empty one).
oh, and I just noticed that I already done something like this, check my midi folder for:
"QuneoPoly4Rec_1"
"poly8ARecorder_1"