PCG Point Index

Hi, how can i get the next point index from my list to perform some operation e.g. getting the distance from point 0 to point 1?
Thanks in advance.