Worth factoring out this function to convert an array of coordinates to an array of positions?