Storing CustomField data in Db

I am trying to create a component similar to EditCustomFieldFreeform. This component allows the users to enter data as a text on the UI but gets stored as a type Select, not Freeform, in the Db. Does anyone have an idea what method in the library stores type in the Db? So far I see methods in,, and My guess is to add a method in to do this and place it in a local dir but decided to throw this out to the list first. Any help would be appreciated. Thanks in advance.