The best build for a mastermind rogue in D&D 5e is an Expert, with the Assassin subclass.
A mastermind rogue in D&D 5e is someone who likes to measure her targets weaknesses, and then sneakily exploit them. An Expert with the Assassin subclass fits this idea well because they are great at finding out their enemies’ weakness, and once they find it, know exactly how to use it against them. Plus being a finesse weapon user means you can attack your enemy’s armor easier than bashing through their defenses head on. Your encumbrance won’t be as much of an issue either, since you’ll mostly be using daggers as your weapons.