I'm making some custom module for magento and need backend settings for my custom entity. So far all was ok, I made a section through xml, made general CRUD actions and some settings that are implemented through tabs (like CMS ones). I included there some inputs, image fields and all works good. But now I need some field that will have arbitrary number of sets of fields and these sets should also have a type (like it's done in custom options in product settings). So my entity should have an arbitrary number of sets and each set have some. The type of set of fields describes what fields should be included to form, so the text will produce an input field and image will give file upload to user. After some looking to custom field files I see that it's implemented differently, making own phtmls. I suppose this won't fit as just a fieldset child, because it's even doesn't have setChild method.
Is somewhere in Magento the such field type that will support this kind of stuff, with arbitrary number of fields. Could it cause some problems with saving/loading it?