There are 3 methods to create opt-in preferences outlined here http://blog.clickdimensions.com/3-ways-to-create-opt-in-preferences-for-gdpr-compliance/
However a common use case may be to request marketing consent on a third party site (EventBrite, Zoom) with a custom question "Would you like to receive updates on future events". Whilst we can capture this information there is no way to update or create a posted preference from this data. It is possible, by workflow, to create the record but the opt-in preference does not flow up to the CD servers, so it is not a true opt-in / out and will not be observed by a mail send or subscription management. The only option at present is manual import from extracted and cleansed data which is too laborious and not client friendly.