Does GreaseMonkey have something built in so you can store data per-site or per-page? For example, say you wanted to tweak StackOverflow.com so you can add a note to each of the questions in your favorites list and sort on that note. Does GreaseMonkey have something built-in to store those notes? Or perhaps can the scripts self-modify, such that you just define an array or object and keep the data there?
Yes - GM_setValue.
This method allows user script authors to persist simple values across page-loads. Strings, booleans, and integers are currently the only allowed data types