Better array handling. Add a unit test with array.