As far as I know (and would someone correct me if I'm wrong), you can store pretty much whatever you want, as long as it is ASCII. If you specify "multiple values" to CGI, when you fetch it again (as an array), it'll have the multiple values. Or you could use seperate cookies. It really is up to you.
You have the form send the info the script, the script parses that data and otherwise munges it, then sticks it into a cookie, and returns a header with that cookie.
Have the button call a script that either sets the cookie's value to nothing, or sets its expiration date to a negative time, which should cause the browser to delete the cookie.