Thanks for your reply, this makes sense.
I probably should've explained what I was trying to achieve.
I am wanting to make sure I am mono and stereo compatible in the daw.
Perhaps the best way is simply to create a mono and a stereo version of the same script, if it's not possible to fix the size at runtime. I'm not really needing an adaptive channel count, in the sense that I know the number of channels will never change during runtime after being set for the first time. Iterating over the samples is often one of the bottlenecks in my code, I am trying to work out the absolute best way to do it.
Or maybe I am still misunderstanding how these things work.
I will continue to test.