Assuming you don't need any special formatting, a formula field with a return type of text that has Owner.Email for the formula would do the job. You can read up more on formula fields here and in the trailhead Kris Goncalves linked in their comment.
Yes, State and StateCode are intractably linked. You can't see it in the UI, because it's just State (or Mailing State, etc). The reason why it exists at all is so that you can have a fully written out State (e.g. Colorado), while having an abbreviated form (e.g. CO) for validating addresses, sending mail, etc. You've already stated your choices here: you ...
Once you're as far as having the list of Ids, you need to massage it so that it reads:
Id IN ('a130Z00000JIdXoQAL','a133q00000RlADNAA3')
To get there, you can write something like:
String assignvar = 'a130Z00000JIdXoQAL, a133q00000RlADNAA3';
String idValues = assignvar.split(', ?'); // Put values into list
// And then join them together with quotes