How to change orientation of 3d plots?

I managed to plot functions z=f(x,y) by generating array of x values, y values and the calculating array of arrays of z-values.
How can I plot y=f(x,z)? If I generate array of x and z values and calculate array of arrays of z-values, it gives me nonsense.

Even in example on the site if I change y to z (to treat y like the “main” axis), it gives me nothing:

How to resolve it without cheating axes names etc.?

Tracked in