Optimal pairing of points in a set
This problem is the 3-dimensional variant of the Euclidean min-cost perfect matching problem (MCPM), and I don't know if it has been studied.  The general problem (min-cost maximum-cardinality matching) can be solved in time $O(\sqrt n \cdot m )$ [^1].
However, the 2-dimensional version can be solved in time $O(n^{3/2} \log^5 n)$.  Reading the article by Varadarajan [^2], I cannot see any issues lifting the result to 3-dimensional points.
[^1] Micali, Silvio, and Vijay V. Vazirani. &quot;An $O(\sqrt{|v|} \cdot |E|)$ algorithm for finding maximum matching in general graphs.&quot; 21st Annual Symposium on Foundations of Computer Science (sfcs 1980). IEEE, 1980.
[^2] Varadarajan, Kasturi R. &quot;A divide-and-conquer algorithm for min-cost perfect matching in the plane.&quot; Proceedings 39th Annual Symposium on Foundations of Computer Science (Cat. No. 98CB36280). IEEE, 1998.