How to transform independent variables to dependent ones with specific dependence structure given by a copula Let suppose that $X_1$ and $X_2$ are independent with $X_1 \sim F_1$ and $X_2 \sim F_2$.
Now assume that $(Y_1,Y_2) \sim F_3$, that marginally $Y_1 \sim F_1$ and $Y_2 \sim F_2$, and the dependence between $Y_1$ and $Y_2$ is ruled by the copula $C$.
What I'm trying to find if there exists a function $g()$ such that
$$
g(x_1,x_2) = (y_1,y_2)
$$ 
 A: If you are talking about continuous random variables, than Sklar's Theorem says (with your notation from above):
$(Y_1, Y_2) \sim F_3$ meaning $ F_3(y_1, y_2) = C(F_1(y_1), F_2(y_2))$, but as $X_1$ and $X_2$ follow the same law as $Y_1$ and $Y_2$ respectively, we can break $F_3$ apart into its margins and copula and replace the margins by $X_1$ and $X_2$: 
$$C(F_1(X_1), F_2(X_2)) \sim F_3 \sim (Y_1, Y_2).$$
In case you are talking about a set of realizations, I would suggest to think visually. The ranks of your pair $(X_1, X_2)$ will be evenly spread over the unit square, while the ranks of the pair $(Y_1, Y_2)$ follow the shape of the density of copula $C$. What you need to do is to somehow push dots from the top-left and lower-right corners towards the first main diagonal (assuming positive dependence of $C$). A function pushing each point half-way towards the main diagonal and assigning the new rank afterwards would introduce some dependence among the previously independent random variables (see R code below). Note that this will change your actual sample anyway as $F_1^{-1}$ and $F_2^{-1}$ of the new ranks will not give the values in the same order. However, (given a large "enough" sample) the histograms of transformed samples $X_1$ and $X_2$ will not change. The design of the function pushing the pairs into the "right" locations is however by no means obvious. 
library(copula)
Rmat<- matrix(c(cos(pi/4), sin(pi/4), -sin(pi/4), cos(pi/4)), 2)
Bmat<- matrix(c(cos(-pi/4), sin(-pi/4), -sin(-pi/4), cos(-pi/4)), 2)

smpl <- rCopula(500,normalCopula(0))
cor(smpl, method="kendall")[1,2]

cor(pobs(t(t(smpl %*% Rmat) * c(1,0.5)) %*% Bmat), method="kendall")[1,2]

