Can Spearman rank correlation be extended to three dimensions? Why can we not define a 3D rank correlation as the elongation of the cloud as a proportion of the multidimensional variance as an extension of the 2D rank correlation case as suggested by @gung? 
There are several attempted answers to a related question in Spearman's Rank-Order Correlation for higher dimensions. However, those answers appear to skirt the issue. This question is a cleanup and an attempt to collate other questions. Please hold off on changing this question at least until the matter is clarified. If this question is a duplicate, then the two questions it refers to are also duplicates. There have been several other questions posted on this site that could be answered by extending Spearman's rank correlation to 3D:
correlation among variable per observation
Aggregation of Correlations Coefficients (Spearman)
I do not see why it could not be done. Has it? If not, would someone please extend Spearman's rank to 3D, please?
 A: Since Spearman correlation in 2D is equivalent to the Pearson correlation between the ranks, and since the $R^2$ is (well, kind-of) the generalization of the Pearson correlation to multiple regression, maybe we can use the $R^2$ of the ranks?
I tried playing with this a bit in R, not sure I can come with any conclusive results.
Remember that Spearman will only find monotonic relations, so the function probably must also be monotonic in each dimension, e.g. $e^{x+y}$.
Here's a code example:
x1 = seq(0.01, 10, 0.1)
x2 = seq(0.01, 10, 0.1)
grid <- expand.grid(x1=x1,x2=x2)
y = exp((grid$x1)/2+(grid$x2)/2)+ rnorm(length(grid$x1),0,100)

library(plotly)
z <- y2
dim(z) <- c(100, 100)
fig <- plot_ly(x=~x1, y=~x2, z =~z)
fig <- fig %>% add_surface()
fig


# Regular linear-regression
mod1 = lm(y ~ grid$x1 + grid$x2)
summary(mod1)$r.squared # [1] 0.4158116

# Linear regression of the ranks
n   <- length(grid$x1)
rx1 <- rank(grid$x1)
rx2 <- rank(grid$x2)
ry  <- rank(y2)
mod2 = lm(ry ~ rx1 + rx2)
summary(mod2)$r.squared  # [1] 0.7485

Though Spearman seems to also be worse, if I increase the variance from 100 to 1000 (0.328 in the regular $R^2$, 0.2547 in the $R^2$ of the ranks).
If I use a non monotonic function, e.g. $\sin(\sqrt{x^2+y^2})$ even without noise

both measures seem to be around zero.
I'm reading now a paper by Chatterjee, "A New Coefficient of Correlation", where he introduces an improved rank correlation he denotes as $\xi$. He mentions that "Multivariate measures of dependence and conditional dependence inspired by ξn are now available in the preprint (Azadkia and Chatterjee 2019)". So you might want to check these out.
