Improved support for functions over arbitrary-order arrays