How to make an enemy that is a clone of a party member?

In my project, there is a late-game dungeon that culminates with a boss battle against four "Shadows" of the four party members.

The idea is that the Shadows would scale with the player character, and would use spells & skills those characters have access to.

I considered making them generalized, with skills the player may not necessarily have yet. This would be far simpler in terms of design and implementation, however, I still think it would be way more interesting if these bosses were exact copies of your party members.

The thing is, doing something like this is very extensive, and I'm not entirely sure where to start implementing something like this. If anyone has any suggestions as to how to do this, I'd be very appreciative.
Maybe when the characters learn a new skill, turn on a switch. Then, have all the possible skills the characters can learn in the enemy AI thing, and have conditions for them to be useable if the corresponding switch is on
you'll have to make a copy of your characters, as enemies.
it could be coded and made on the fly, but the copy is the most stable way.
grab the demo

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-an-enemy-that-is-a-clone-of-a-party-member.146444/