With PLx (miSCellaneous_lib) it could look like this:
~a = [1, 2, 3, 4, 5];
Pdef(\x, Pbind(
\dur, 1,
\seq, PLseq(\a, inf),
\rand, PLrand(\a, inf),
\shuf, PLshuf(\a, inf),
// and all other PLx patterns ...
)).trace.play
// replace while running
~a = [\a, \b, \c]
As James says, Ptuple is a trickier case. I have not implemented a PLtuple as I had no clear use case in mind. What would one want to replace, numbers, Patterns ?
WIth the versatile Pn & Plazy combo and Streams you could achieve something:
~a = [1, 2, 3, 4, 5];
// Pfuncn defaults to repeats 1
Pdef(\x, Pbind(
\dur, 1,
\tuple, Pn(Plazy { Ptuple(~a.collect(Pfuncn(_))) })
)).trace.play
// replace while running
~a = [\a, \b, \c]
~a = [\a, \b, Pseq([0, 1], inf).iter]
~a = [\a, \b, Pseq([2, 3], inf).iter]
WIth a helper function it can be done more smoothly
~myPtuple = { |sym| Pn(Plazy { Ptuple(currentEnvironment[sym].collect(Pfuncn(_))) }) }
~a = [1, 2, 3, 4, 5];
Pdef(\x, Pbind(
\dur, 1,
\tuple, ~myPtuple.(\a)
)).trace.play
~a = [\a, \b, \c]
~a = [\a, \b, Pseq([0, 1], inf).iter]
~a = [\a, \b, Pseq([2, 3], inf).iter]