Assign to different assignees based on entered number

hi
I created a process which in the first of that there is a user task and that user task has a form. and in that form there is a “number” field which we can put numbers in that.
after that, the user task is connected to a script task with a simple “groovy” script.
script is :
def collection = []
for(int i = 1;i<=number;i++) {
collection << i
}

execution.setVariable(“collection”, collection)

after that script task is connected to a multi instanced user task which with “${collection}” in collection field in multi instance section .

now when we deploy process and run it , in first of process asks us to put a number in number field .
after that , creates some user tasks which number of user tasks is based on that number field that we inserted at first of process .
for example if we put 4 , at the end creates 4 user task with these names :
1 st userTask
2 st userTask
3 st userTask
4 st userTask

for now , i want to put some names in array list as assignees that when we put 4 in number field , at the end instead of (1,2,3,4) numbers , lists four names in order automatically . but i don’t know how i do that .

my diagram is :

hi again
if we use javascript format , the script will be like this ?? :

var collection = [‘a’,‘b’,‘c’,‘d’,‘e’] ;
var second = [] ;
for (var i = 0;i<number;i++) {
second.push(collection[i])
}
execution.setVariable(“second”, second) ;