No idea what you mean by a doodle effect but if you’re simply asking how to apply this same logic to an arbitrary number of textures, use custom hlsl with an active index parameter.
For example, for hot-swapping 4 textures:
float4 texA = TextureSampleA;
float4 texB = TextureSampleB;
float4 texC = TextureSampleC;
float4 texD = TextureSampleD;
int idx = ActiveChannelIndex;
float4 result;
if (idx < 0.5)
result = texA;
else if (idx < 1.5)
result = texB;
else if (idx < 2.5)
result = texC;
else
result = texD;
return result;