I'm not entirely sure what you're after but the Moodle Form API does have a method render with produces the html code for the form. You can pass the return of this directly to a Mustache template rather than use the display method.
$data->form = $mform->render();
for example, where data is the object you are passing to the template.
If you alternatively just want to pass individual parts of the form to Mustache then I don't know the answer, but I would be interested.