Multiple creating table record

Hi,
i got an array of data that i want to create as record into table . I was not able to do this in one shot, i am currently playing with the length of the array and pop the lastest value at each time.
Do you know if there is a more efficient way to do without to have multiple condition ?
Of course, for my case the lenght is at most equals to 10.

Mathieu.