Bash pass array to function as second argument. Even integers have to be converted from string to int.