Fix check if the variable argument is an array

the previous vesion checked if the last argument passed
is an array.
This fix check if the right argument (the last of the function type)
is an array.

  funtion foo = |args...| {
    #...
  }

  foo(array[1, 2], array[3, 4])

is equvalent to

  foo(array[array[1, 2], array[3, 4]])