Any periodic function which contains a scaled or translated version of its own derivative, for example sine or cosine , or any finite or infinite sum of multiple periodic functions which also yields a periodic function which is its own derivative, can be expressed in the format which you are asking for. (Assuming that you are considering the sine solution you listed as a non-trivial solution)
For example, for $k=1$, you can transform the domain and range of the function $y=sin(x)$ to $y=2\pi sin(x/{(2\pi)})$$y=2\pi sin(2\pi x -\pi/2)$, or for arbitrary $k$, $$y=k sin(\frac{2\pi x}{k})$$$$y=k sin(\frac{2\pi x}{k} - \pi/2)$$
You can create a similar function for cosine by adding a different phase shift to the domain. So for arbitary $k$, you could use sine or cosine with the domain scaled and translated and the range scaled as necessary to get a solution of the format you'd like.
$$ y = c g(\frac{a x}{k}+b) $$
If you are looking for a non-periodic trivial solution, then it's a different story and answer, delayed differential equations, as pointed out by Denis Serre above.