Add support for shaped arrays