How to derive PDE for a given surface? The title may be ambiguous, therefore I will illustrate it using an example. Let's say we have a curve $y=\sin \left( x\right)$. We can say that corresponding ODE is $\dfrac{dy}{dx}=\cos \left( x\right)$. i.e. $y=\sin \left( x\right)$ is solution of $\dfrac{dy}{dx}=\cos \left( x\right)$. Now, lets say I have a surface in 3d i.e $z=\sin \left( x\right) +\cos \left( y\right)$. Is it possible to come up with PDE whose solution is $z=\sin \left( x\right) +\cos \left( y\right)$.
 A: Say we are given the function
\begin{align}
y=f(c_1,c_2,x),
\end{align}
where $c_1$ and $c_2$ are parameters. Taking a derivative we find that
\begin{align}
y'=f'(c_1,c_2,x).
\end{align}
We can treat these two equations as a system for the parameters $c_1$ and $c_2$. Assuming that it could be solved, we'll denote the solutions as
\begin{align}
c_1=\varphi_1(x,y,y') \quad \text{and}\quad c_2=\varphi_2(x,y,y').
\end{align}
Now consider the equation of the form
\begin{align}
F(\varphi_1,\varphi_2)=0,
\end{align}
where $F$ is an arbitrary equation of $x$, $y$, and $y'$. The equation $F=0$ is solved by the function $y=f(c_1,c_2,x)$, with the constraint on the constants $F(c_1,c_2)=0$.
$F$ can be any function, It will have the solution $y=f$! You can use this method with an implicitly defined function like $f(c_1,c_2,x,y)=0$, and you can add constants to arrive at higher order ODEs. The text I am pulling this from does not claim this is the most general equation with solution $y=f$, nor am I. (Though it doesn't seem like the craziest notion).
Let's alter your example to have two constants so we can use this method:
\begin{align}
y=c_1\sin(x)+c_2,\quad \rightarrow \quad y'=c_1\cos(x).
\end{align}
Solving for our parameters we get that
\begin{align}
c_1=\sec(x)y'\equiv\varphi_1,\quad c_2=y-\tan(x)y'\equiv \varphi_2.
\end{align}
So any equation of the form
\begin{align}
F(\sec(x)y',y-\tan(x)y')=0
\end{align}
has the solution
\begin{align}
y=c_1\sin(x)+c_2,\quad\text{w/ constraint}\quad F(c_1,c_2)=0
\end{align}
Can we extend this to multivariable functions/surfaces? I don't see why not. Given the function
\begin{align}
z=f(c_1,c_2,c_3,x,y)
\end{align}
we'll take two derivatives,
\begin{align}
z_x=f_x(c_1,c_2,c_3,x,y),\quad z_y=f_y(c_1,c_2,c_3,x,y).
\end{align}
Again assuming we can solve these equations for the constants we would have the (3) equations
\begin{align}
c_k=\varphi_k(x,y,z,z_x,z_y).
\end{align}
Considering the function
\begin{align}
F(\varphi_1,\varphi_2,\varphi_3)=0,
\end{align}
we again see that $z=f(c_1,c_2,c_3,x,y)$ solves it, with the constraint that $F(c_1,c_2,c_3)=0$.
Let us alter another one of your examples:
\begin{align}
z=c_1\sin(x)+c_2\cos(y)+c_3.
\end{align}
Utilizing the method described above we find that
\begin{align}
c_1=\sec(x)z_x\equiv \varphi_1,\quad c_2=-\csc(y)z_y\equiv \varphi_2,\quad c_3=z-\tan(x)z_x+\cot(y)z_y\equiv\varphi_3.
\end{align}
So then, any equation of the form
\begin{align}
F\big(\sec(x)z_x, -\csc(y)z_y, z-\tan(x)z_x+\cot(y)z_y\big)=0
\end{align}
has the solution
\begin{align}
z=c_1\sin(x)+c_2\cos(x)+c_3,\quad\text{w/ constraint}\quad F(c_1,c_2,c_3)=0.
\end{align}
I pulled this method (for the ODEs) from the text Handbook of exact solutions for ordinary differential equations / Andrei D. Polyanin, Valentin F. Zaitsev.--2nd ed.
