I got no idea on rhinoscripting or python scrpting (yet!) but is using any tool to remove duplicate points out of scope?
In grasshopper you have plenty of choices to do that (for example kangaroo remove duplicate points tool), or to simply extract the vertices of a mesh as shown in the picture.