Figured out how to make getopts my bitch

...as well as manipulate variable names to match patterns etc. For
that matter I know how to split a large string into multiple
variables, which answers my original problem of having too many loops.