Takes in data and adds to array