I am building a campaign centered around the machinations of this one old elf wizard. I'm planning for the dramatic final encounter to be the PCs against him. The problem with this is that the PCs are going to be 15-17th level by the time they are up against him, and the maximum level for characters is 20th, which would be where he's at with the rules in 5e. 

My only current idea is to create a few extra-powerful custom spells for him, but I'm not too sure how that will play out at all. I'm also curious how one would do the same for less magic driven classes, like fighters or rogues or whatever.