Characterize a point cloud
You can use essentially any centroid-based clustering algorithm to define a notion of "coherence" or "purity" of a cluster. Let's say you've chosen some particular metric $||\cdot||$ on $\mathbb{R}^n$ (I'm using norm notation but any metric will do). Using your notation, $S_i$ is the $i$th "cluster". For each $S_i$, find the* point $c_i\in\mathbb{R}^n$ that minimizes
$$ F(c):=\sum_{x\in S_i}||x-c||\qquad(*)$$
over all $c\in\mathbb{R}^n$. Let $F(c_i)$ be the purity score of $S_i$; it might actually be better to consider the normalized version $F(c_i)/|S_i|$. Smaller values means more homogeneity or "purity".

*How to do this computationally? Try (sub)gradient descent. If the minimum is not unique then break ties arbitrarily.