Yes, the stock Levenbert-Marquardt implementation only deals with 1D data.
General Levenberg-Marquardt does NOT care how your data is arranged in 2D, you simply need a way to generate a flat Z array as a function of your (x,y) input data pairs to be compared with the measured data arranged the same way.
Have a look at this recent
example. (It basically makes a few trivial modifications to my
earlier 2D fit example).
In my XuFit example, the x,y data pairs are sent to the model calculation as an interlaced array, but you could sent it in any other way as long as the model knows how to interpret it. For a more detailed discussion, have a look at my other commetns in the above threads. Good luck!