in reply to Fastest way to turn coordinate list into array
Untested, but does this do what you want?