Using queries instead of loops to modify database principals
You are going to have to use dynamic SQL.  Even if there were a way to access a system table that has all the information on on server, you would need dynamic SQL for the four-part naming on other servers.

By the way, you can resolve variables inside queries.  However, a variable does not work for a server, database, table, or column name.  In short, variables replace constants.  

Here is a suggestion on how to do it in your case.