Add new parametric curve object/type using Python
There is an extra objects addon that provides a 3d function surface that should help with how to create the mesh.

For the showing the surface in the viewport I would look at CGCookies retopology tools. If you watch the demo video you will find they draw a preview over the mesh object before creating the final mesh data.

You might want to look at the PropertyGroup or Collection types as a way to add extra data to an object.

There is a chance you may be asking too much for python, maybe you need to consider it as a patch to be added to blenders main source code.