Added test for writing array values