Structure raw data into an array of nodes