What is the best build for a rogue in D&D 5E for a mastermind build?
Would a mastermind rogue need to be concerned with stealth? No. A mastermind’s primary focus is subterfuge and negotiation, not stealth. Stealth might be an aspect of the game you’re playing with your GM, but it doesn’t really fit this kind of question about builds for a mastermind build.
Is there any good background to choose as the wealthy noble? Yes. Your background should match your proficiency bonus, so wizardry or magic backgrounds are good choices if you have proficiency in Arcana or Occultism respectively.
I’m a spellcaster that knows some spells of another type what would be effective? Yes! Some good options are transmutation spells that change terrain features such as mountains into hills (casting Mold Earth) or changing the area into difficult terrain (casting Grasping Vines) to hinder pursuers. These are both druid spells that can also be cast by the spellcasting feature of certain monsters.