Add test for insertIntoArray