Fix createMask unit tests
Add createMask unit tests for numeric types and non-square arrays