I'm not sure specifically as there could be various interpretations in such a fanfiction. Maybe Metal Sonic sets Sonic up in a way that makes Sonic look bad to the other characters, perhaps by faking some evidence or causing chaos and making it seem like Sonic's fault.
Well, Sonic is obviously a main character since the whole concept is about him getting framed. Tails is often another main character. He could be initially misled into believing Sonic is guilty but then start to have doubts and help Sonic prove his innocence.
Well, in some Sonic fanfiction, the idea of Sonic getting framed by Metal Sonic can involve a complex plot. Maybe Metal Sonic sets up Sonic to look like he's done something wrong, like stealing a chaos emerald or causing chaos in the city. It could be part of a villain's scheme to turn Sonic's friends against him.
One possible plot could be Sonic being framed for stealing the Chaos Emeralds. He then has to go on a journey to prove his innocence while facing his friends who have turned against him.
Often, it begins with Metal Sonic being given some sort of motivation by an outside force or just his own envy. He then starts to plan how to frame Sonic. He might first create a false identity or a false trail that leads back to Sonic. This could be as simple as leaving Sonic - like items at the scene of a 'crime' he's supposed to have committed.
Positive Sonic fanfiction could be about Sonic mentoring the younger characters like Tails and teaching them important life lessons. Or it could be about Sonic and his friends having to solve a mystery in their world, like a strange disappearance of an important item or character. Fanfictions that show the characters growing and evolving in positive ways, such as Amy becoming more confident in her own abilities, are also excellent alternatives to inappropriate fanfiction themes.
Sonic would probably be very shocked at first. He trusts Amy, so her betrayal would be unexpected. He might initially try to talk to her to understand why she did it.
It could be Dr. Eggman. He's always been after Sonic and trying to defeat him. Experimenting on Sonic could be his new way to find Sonic's weaknesses or to gain his powers for himself.