Add a test for invalid indexing of arrays