Actually implemented this in a game I've been building: A cosmic horror creature that rolls dice to determine the bonuses and stats for each... individual...roll. It's attacks are also randomized as well as the base stats. Literally unknowable.
I think a good way to do this would be: make a table of creatures, or roll a die with one side per monster in the monster manual. Every time the players interact with this shapeshifting thing or after it takes an action, roll again on the table.
Using a smaller table could work well if you wanted to have a theme - here’s a dragon that changes color and elemental abilities at random! Here’s a drow druid who can shift between several spider and demon forms!
Using a larger table could represent a truly chaotic and unpredictable shapeshifter, but makes it harder to balance or manage in combat.















