There's also a possibility that some unexpected characters come to Harry's rescue. For example, a group of centaurs who have a grudging respect for Harry might decide to help. Or perhaps some of the less - known good wizards who have a sense of justice and know that Harry is being framed. They could team up and use their combined magical abilities to break Harry out of Azkaban.
It could be Dumbledore. He has great power and knowledge. He might have some secret plan all along. He could use his influence and magic to enter Azkaban and free Harry, especially if he discovers that Harry is wrongly imprisoned.
In the 'harry locked in azkaban fanfiction', it's possible that Voldemort has a hand in getting Harry locked up in Azkaban. Harry, being the strong - willed wizard he is, tries to communicate with the other inmates to find out if there are any clues related to Voldemort's new plot. He also has to deal with the harsh conditions of Azkaban, like the cold and the constant threat of the Dementors sucking out his soul. But he doesn't lose hope and keeps looking for a way to escape and save the wizarding world from whatever danger Voldemort is planning.
Hermione might be one of the helpers. She's very intelligent and could come up with a clever plan to get Harry out. Maybe she uses her knowledge of ancient spells.
Hermione could be one to rescue Harry. She might have discovered some new spell or potion that allows her to bypass the protections around the Dursleys' house and get to Harry. Then she'd use her intelligence and quick thinking to get him out of there safely.
One possible motivation could be guilt. Snape has always had a complicated relationship with Harry. Maybe he feels guilty for not preventing Harry from being wrongly accused and sent to Azkaban. So, he decides to make it right by rescuing him.
It could be a jealous classmate from Hogwarts. Someone who has always been in Harry's shadow and finally sees an opportunity to get rid of him. This person might be a Slytherin who has connections with some dark wizards outside of school and they work together to frame Harry.
Obviously, Harry Potter himself is a key character as the story is about his release from Azkaban. Dumbledore is likely to be important too. He has the power and influence within the wizarding world to potentially free Harry. His wisdom and knowledge of the situation would play a big role.
One possible main goblin character could be Griphook. He already has a connection with Harry through their interactions in Gringotts. He is intelligent and resourceful, so he would be a likely candidate to lead the rescue mission.
It could be Hermione. She's always been smart and resourceful, and she might have found evidence to prove Harry's innocence and get him released.
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.
It could be Sirius Black. Since he has his own experience with Azkaban, he might know some secrets about the place. He could return in some form within the fanfiction and assist Harry in his escape, maybe by leading him through some hidden tunnels or using some special skills he developed during his time in prison.