Let $X$ and $Z$ be two (possibly dependent) random variables. Is it necessarily the case that there exists a Borel function f and a random variable $Y$ that is independent of $X$ such that $Z = f(X, Y)$? If this is true, this would help with a result I am trying to prove. By random variable, the more general the better, ideally the proof technique would work for all of classical random variables, random vectors in $\mathbb{R}^n$, random elements in a metric space, etc. There are no conditions on $f$ other than Borel, it can be discontinuous, etc. The only condition of $Y$ is that it is independent of $X$.
Also, if this is a known result in some book or article, could you please post the name that book or paper and where this result is contained. Almost everything I can find talks about under what conditions dependent random variables can be written as sums or linear combinations of others (for example, https://en.wikipedia.org/wiki/Indecomposable_distribution), nothing about general functions.