Use a different array for each track (and at least one for system) and save the notes/events at an index relative to its play time.
Even for long compositions you'll "waste" at most 8 to 10 MiB of memory (even 32 MiB, if you need it, isn't a lot these days) and it will be easier for you to keep the timing in synch not only for the whole but also for the tracks between themselves.
This is specially important if you're using more than one external synth and/or long runs of wire.