We built a Cloud Page set that updates the master-subscribe (AllSubscribers) and Publication Lists and passes/retrieves information from Sales Cloud as well, so this is surely possible.
Processing is done with AMPscript and some SSJS, so I'd advise to get familar with these two first.
There's also an option to write SOAP API / AMPscript variation as well, though this is a bit tricky.
Adam has provided a nice clean boilerplate code to start with in GitHub, check that one out if you're not sure how to start off.
In addition I've seen many variations of fully-built custom profile/subscription center code sets posted in github, so if you try to search you'll probably find even more examples.
For an example - a fully built custom preference center code in Github.
Hope this helps.