Well, in some fanfictions, Harry might use some hidden magic he discovers in Azkaban. Maybe he finds a way to turn the Dementors' power against Voldemort. Since Dementors can suck out a person's soul, Harry could somehow direct them towards Voldemort, weakening him enough to deliver the final blow.
One possibility is that Harry teams up with the inmates of Azkaban who have grudges against Voldemort. These inmates, despite being locked up, might have some unique knowledge or powers. Together with them, Harry forms a plan. He uses the dark and dreary environment of Azkaban to his advantage, setting up traps and using his own magic in combination with the inmates' help to finally kill Voldemort.
In this kind of fanfiction, it could be that Harry has some sort of special artifact or spell. For example, he might have found an ancient spell book in Azkaban that contains a powerful spell capable of destroying Voldemort once and for all. He then uses his skills and courage to perform the spell successfully.
Perhaps Voldemort has some inside help. He could have bribed or threatened one of the guards or even a Ministry official who has access to Azkaban. This person could then help him get in and break Harry out. Or he might have found a secret passage into Azkaban that the Ministry doesn't even know about, and he uses that to his advantage.
Maybe Harry uses some powerful and unexpected spells. For example, he could combine the Patronus Charm with a blasting spell. The Patronus might distract Voldemort while the blasting spell hits him hard.
The wizarding world would likely be in a state of shock and then celebration. People would start to see Azkaban in a new light, perhaps no longer as just a place of horror but also as the site where the great evil was finally vanquished.
Harry might use his wits and the environment around him while in captivity. For example, if he's held in a place with magical artifacts, he could use them to his advantage. He could break the chains that bind him with a spell - enhanced object and then make his way to Voldemort and defeat him.
Maybe he uses some powerful magic spells that he has learned secretly. For example, the Patronus charm could be used to fend off the Dementors which are the main guards in Azkaban. He might also get some unexpected help from his friends or some mysterious characters within the fanfiction world.
Harry might survive in Azkaban because of his connection to his friends, even if they betrayed him. Their memories could give him the strength to hold on. And he may be able to use his magic in unique ways. He could draw on the positive emotions he has left, like his love for his parents, to create a shield against the Dementors. Plus, he may be constantly looking for a way to prove his innocence and that hope could keep him alive.
Well, in many fanfictions, Harry might use a combination of his existing skills and newfound powers. He could use his Parseltongue ability to communicate and perhaps distract the Basilisk, and then strike it with the Sword of Gryffindor. Another way could be that he uses some sort of spell he's been secretly practicing that gives him an edge in the fight.
One reason could be that Voldemort wants to use Harry for his own gain. Maybe he thinks he can turn Harry to the dark side and use his power for some grand evil plan. He might believe that with Harry on his side, he can finally defeat all his enemies and rule the wizarding world completely.
In this fanfiction, it could be that Voldemort has a premonition. He sees that if Harry Potter dies, it will lead to a series of disasters that will also destroy his own plans. So, in order to preserve the balance or to keep his long - term goals intact, he saves Harry. For example, if Harry's death causes an uncontrollable chaos in the wizarding world, Voldemort's rule over the dark forces might be disrupted. So he steps in to save Harry.
Yes, there might be such fanfictions out there. Fanfiction writers often explore alternative storylines, and the idea of Pettigrew turning on Voldemort and killing him is an interesting and unexpected twist. It could involve Pettigrew having a change of heart due to some complex reasons, like realizing the true evil of Voldemort's ways or having a personal vendetta against him that overrides his loyalty.