Would variables be global (could be used by any command block)? If so, there could be an issue with accidentally using an existing
Also, I would like to suggest a few methods which would be useful:
@e.nameUUID - This gets a players name, but as that player's UUID rather than the in game name. //word
@e.getMobType - if given a mob's UUID, it will tell you the ID of that mob. //word
@e.getnbt.[nbt tag] - This would get the value of a specified NBT tag. //varies
Note that almost anything is possible if you can look at an entity's NBT tags. You could check health, the equipped item, what's in it's inventory, if it is hostile, if a creeper if charged or if a dog is tamed.
I would love to see editing the NBT values of existing mobs, but that is an idea for a different topic (i'm sure they're out there). I don't want to see this become a wishlist.