Growing array in pattern

thanks guys, @joesh yes something like that, but the resulting array should keep growing like this:

[1,2,3,4]
[1,2,3,4,5]
[1,2,3,4,5,6]

actually in my piece i want something like this each repeat for my \dur key:

[0.25,1.25,0.5,0.5] //3 beats
[0.25,1.25,0.5,0.5, 0.5, 0.5, 0.5, 0.5] // 5 beats
[0.25,1.25,0.5,0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5] // 7 beats

or be able to inverse this. basically i want to dynamically grow or shrink the resulting array each repeat.