Parametric Equations for a $2$-torus

A few words concerning nomenclature: The surface of a donut is a $2$-torus, or a closed surface of genus $1$. A donut with $2$ holes is not a $2$-torus but a closed surface of genus $2$. An $n$-torus for arbitrary $n\geq1$ is the manifold obtained from ${\mathbb R}^n$ by identifying points whose coordinates differ by integers.

A $1$-torus is nothing else but the circle $S^1$. The map $$u:\quad\phi\mapsto(\cos\phi,\sin\phi)\qquad (-\infty<\phi<\infty)$$ used to ”parametrize" $S^1$ is actually a covering map: It is locally (i.e., for short $\phi$-intervals) a diffeomorphism, but to each point $z\in S^1$ belong infinitely many $\phi$'s with $u(\phi)=z$.

In the same way the parametrization you gave for the $2$-torus is a covering map: Each point $(x,y,z)$ on the torus is produced infinitely many times. When you want to compute the area of the torus you have to restrict this map to $[0,2\pi]\times[0,2\pi]$, even though it is defined on all of ${\mathbb R}^2$.

Now the closed surfaces of genus $\geq2$: Here no elementary parametrization is possible. In the theory of Riemann surfaces it is shown that such a surface $S$ possesses a "universal" covering map $\pi: \ D\to S$ $\ (D$ is the unit disk in the $z$-plane), where again each point $p\in S$ is produced infinitely many times. Here the different $z$'s that produce the same point $p\in S$ are not related by translations $z\mapsto z+2\pi j +2i\pi k$, as in the case of the $2$-torus, but by a group of Moebius transformations.