add tests for array and matrix