How to get map NPC nodes coordinates

Hello, how to get NPC nodes coordinates and put them in array. I need the the simplest way to make it.

Thanks.