A simple pendulum, for example, is not isochronous for large amplitudes (that is, the frequency will depend on the amplitude). So a particle confined in a circumference will not always exhibit a pure harmonic motion. Is there a curve for which the frequency will always be independent of the amplitude?
If you built a surface such that its height was proportional to a horizontal coordinate $x^2$, $h = k x^2$, then the potential energy at point x would be $mgh = m g k x^2$, which is a harmonic potential. In other words: yes, the curve exists and it's a parabola. This assumes uniform $g$, though, I guess if you want to be a stickler you could note that if the parabola were really big then that assumption wouldn't hold.