For the simple purpose of exercising and better learn Houdini I decided to give it a try, and I came up a with network of points each connecting to its n neighbours (with or without point already processed, controlled by numrange2 of nested foreach). Really not sure if this is a valid way to use the foreach SOPS though...
I'm sure there is a cleaner way to obtain the same results, even avoiding using nested for each SOP.
connecting_neighbours.hipnc