I've been playing and DMing D&D for 10 years across versions 3.5 to 5e and am now running a campaign for a group of enthusiastic newcomers in 5th Ed. The group is a mix of level 4 and level 3 characters.
I've been taking a lot of style inspiration from the Sword and Sorcery subgenre (moral ambiguity, magic as a force of evil/non-good) and I feel like the party's finally ready for an evil wizard/sorceror as a dungeon boss.
The only problem is that I'm inexperienced with playing primary spellcasters and don't have a lot of experience in leveraging magic users as hostile NPCs. If I were to make an evil magic user as a stand-alone boss (or a boss with minions) what spells and tactics should I give this NPC to make him challenging and memorable to the PCs without setting up an unavoidable TPK?
Specifically, since I am dealing with a mix of level 4 and level 3 characters, I would like to challenge them with with a CR 6-7 encounter. The group is eager to play but inexperienced so I feel like this is the upper limit for them.
Right now I'm envisioning the boss as a shadowy cult leader leading a cult devoted to some evil deity/demigod of snakes/spiders/other creepy crawlies. As such, what spells could I use to create a sense of of confusion in the characters as they try to get in melee range? Beyond confusion, what spells could limit party movement as the cult leader's minions (either humanoid cultists or monsters) could close in to protect their dark master? As a higher-Int character the boss should also have contingency plans for invaders such as traps but I also want to give the party the opportunity to bypass some hazards if they're clever.
What level should I make this NPC if I am to use the standard character generation system and class levels?