You can add as many functions and initial values in input as you want, you just have to specify it when defining the loopNTimes function.
def loopNTimes(var1:var[]..[],var2:var[]..[],n:int,func1:Function,func2:Function,func3:Function){
c = [Imperative]{
i = 0;
v1 = var1;
v2 = var2;
v3 = var2;
while(i<n){
v1 = __Apply(func1,v1);
v2 = __Apply(func2,v2);
v3 = __Apply(__Apply(func3,v3),v2);
i = i+1;
}
return [v1,v2,v3];
}
return = c;
};