Storing data in an array