Keep in mind that the way you represent your sequence data will be intimately tied to the overall sequencer clocking. I suggest that you look into standard clocking approaches such as 24 PPQN (6 sub steps per step), 48 PPQN (12 sub steps per step), 96 PPQN etc. Of course nothing forces you to do it this way, but those are good starting points. Since you want to implement ratchets and delays, you need to make sure there is a consistent time interval between two of you smallest “sub steps”, and that’s the timing that your main clock/timer/metro will be using. Using the standard numbers from above, 8 or 16 sub steps per step is closer to triplets etc.
In terms of storing your data, a flat array, or nested arrays, are two approaches that make sense. Depending on which one you choose, some operations will be easier to code, and other less so. It’s tradeoffs. But neither approach is inherently bad. I suggest you pick one and move forward, and depending on the specific features of your sequencer, you will realize over time which tradeoff makes more sense. And finally, keep in mind that there are no rules and just suggestions. Experiment!