Preheat your oven to 350°F (175°C) and line a cupcake pan with cupcake liners.
In a mixing bowl, combine the flour, baking powder, baking soda, and salt. Set aside.
In another large bowl, use an electric mixer to beat the softened butter and granulated sugar together until light and fluffy.
Add the eggs one at a time, mixing well after each addition. Then, mix in the coconut milk, crushed pineapple, dark rum, and vanilla extract until fully incorporated.
Gradually add the flour mixture to the wet ingredients, folding gently with a rubber spatula until just combined. Be careful not to overmix.
Divide the batter evenly among the cupcake liners, filling each about two-thirds full.
Bake in the preheated oven for 16-18 minutes, or until a toothpick inserted into the center comes out clean. Allow the cupcakes to cool in the pan for 5 minutes before transferring them to a wire rack to cool completely.
While the cupcakes are cooling, prepare the frosting. In a bowl, beat the softened butter until creamy, then gradually add the powdered sugar, mixing on low speed. Pour in the heavy cream and dark rum, and beat until fluffy and smooth.
Once the cupcakes are completely cool, frost them generously with the rum-infused buttercream.
Optional: Garnish each cupcake with shredded coconut, a small slice of pineapple, and a maraschino cherry on top.