transform nodelist into array of nodes