One important point to clarify is that the idea that "z could be so high that the velocity would be relativistic" doesn't really make sense from a physical perspective. Making a comparison of velocity to determine if something is relativistic requires your objects to be "local" (i.e. nearby) each other. Just because $z>1$ and therefore $v = cz > 1$ doesn't mean anything is going faster than the speed of light in its local frame.
There is a generic formula for comoving distance to a given redshift $z_1$, which can be derived from the Freedman equations:
$$d_c(z_1) = \frac{c}{H_0}\int_0^{z_1} dz \left[\Omega_r(1+z)^4+\Omega_m(1+z)^3+\Omega_k(1+z)^2+\Omega_\Lambda\right]^{-1/2}$$
where $c$ is the speed of light, $H_0$ is the local Hubble constant, $\Omega_r$ is the radiation density of the universe, $\Omega_m$ is the matter density, $\Omega_k$ is related to non-zero curvature, and $\Omega_\Lambda$ is the dark energy density. All densities are at $z=0$ (i.e. present day) and their redshift evolution is captured in the (1+z)-type factors depending on how their energy density scales with the expansion.
There are various calculators online where you can plug in your favorite numbers and calculate a comoving distance: https://ned.ipac.caltech.edu/help/cosmology_calc.html