Cook the Acini di Pepe pasta according to the package instructions. Drain and rinse under cold water. Set aside to cool.
In a medium saucepan, combine the flour, sugar, and water. Whisk together until smooth. Cook over medium heat, stirring constantly, until the mixture thickens and comes to a boil. Remove from heat.
Stir in the pineapple juice and vanilla extract. Allow the mixture to cool completely.
In a large mixing bowl, combine the cooled pasta, crushed pineapple, mandarin oranges, mini marshmallows, and shredded coconut (if using).
Once the sauce has cooled, fold in the whipped topping until well combined. Pour the sauce over the pasta and fruit mixture.
Gently mix until everything is combined. Cover and refrigerate for at least 2 hours before serving.
For added flavor, consider adding nuts or additional fruits of your choice to the mixture before refrigerating.