Allow flat arrays in batch array function