Hmm, I feel like there's probably a way to cycle through a preset pattern of numbers but I can't think of it. You can potentially use variables to set values through events, I'm just wondering if there's a way to streamline it more than what I have in mind.
Basically something like,
Level=1 + Variable1<=5 --> Set Array value [Variable1] to [Variable2] + Add 1 to Variable1 + Run Function "Z"
Level=2 + Variable1<=11 --> Set Array value [Variable1] to [Variable2] + Add 1 to Variable1 + Run Function "Z"
On Function "Z"
[sub-event] If Variable2 = 2 --> Set Variable2 to 5
[sub-event] If Variable2 = 5 --> Set Variable2 to 9
[sub-event] If Variable2 = 9 --> Set Variable2 to 13
etc.
So if Level=1, it'll run through Array values 0 to 5 using Variable1 as the index, and assign the value of Variable2 to each, where Variable2 is responsible for keeping track of the pattern. If Level=2 it does the same for values 0-11. I think this ought to work.