Finished formatting array to turn into database