Calculating distance between array of points

Hi, I want to calculate the distance between an array of points to control the size of an instance. I need to calculate each point for each point so that in the cluster of points, the size of the geometry become smaller.