Madagascar is purely fictional. The story and characters were invented by the creators to provide an enjoyable and imaginative adventure for the audience. There's no real-life basis for it.
One popular 'nana x nana fanfic' story could be about their adventures in a new city together. They might discover new music and bond over it, exploring the local music scene.
Well, a fanfiction about Joey in love in 'Penguins of Madagascar' could be really interesting. Maybe Joey falls in love with a new character introduced in the story, like a female penguin from a different colony. They could meet during an adventure, and Joey is instantly smitten. He might then try to impress her with his unique skills, like his ability to find the best fish in the ocean.
There could be many fanfictions about Baby Alex from Madagascar. It might focus on his early days in the zoo, his interactions with other animals there. For example, it could describe how he played with the other young animals, or how he first discovered his love for dancing.