I am working on the first main antagonist for my campaign, DnD 5th edition. This will be a green or blue dragon who has the ability to shape change into a human and is a magic user. The dragon will be attempting to gather magical knowledge, spell books, arcane items etc. thereby gathering strength and becoming harder for the party to combat as the campaign progresses. It initially appears as an ally.
I know there is an arcane dragon archetype in the Monster Manual, but these dragons seem to have inherent magic much like a sorcerer as opposed to learnt. I am looking for my dragon to have some inherent magical ability strengthened by utilizing spells more like a wizard, having an ever-growing list of available spells as it gains more knowledge but needing to prepare a set amount each day based on its development.
I am aware that there are differences between Chromatic and Metallic dragons; my antagonist will be Chromatic, so I am focusing on this type of dragon. I am also aware that by allowing my chromatic dragon to shapeshift into a human, I am posisbly going against the rules.
In terms of either Current or historic D&D lore and mechanics, are there examples of dragons learning spells in this way, gathering a magical arsenal in the same way as a wizard would and growing in terms of magical ability over time by learning new knowledge? I am happy if the lore or mechanics ideas come from older editions of D&D that I can tweak to fit in with 5th edition. As per the comments, I realize the pre-WOtC editions where very different and may not be a easily retrofitted to match 5th edition.
I am specifically looking to see if there is any precedent I can work from to try and make this more balanced as the campaign progresses from a fixed list.