Preheat oven to 350°F (175°C). Line a 12-cup muffin pan with paper liners.
In a bowl, whisk flour, baking powder, and salt.
Set aside.
In a large bowl, whisk sugar and melted butter until glossy. Add eggs one at a time, whisking until smooth. Stir in coconut milk, lime zest, lime juice, and vanilla.
Fold the dry ingredients into the wet with a spatula until just combined.
Gently fold in shredded coconut. Do not overmix.
Divide batter evenly among liners, filling each about 2/3 full.
Bake 16–19 minutes, until the tops spring back and a toothpick comes out clean or with a few moist crumbs.
Cool in the pan 5 minutes, then transfer to a rack to cool completely before frosting.
Make the buttercream: Beat butter and cream cheese until fluffy, 2–3 minutes. Add 2 1/2 cups powdered sugar, lime zest, vanilla, and a pinch of salt. Beat on low to combine, then on medium until creamy.
Add lime juice to taste and more powdered sugar if needed for piping consistency.
Frost cooled cupcakes. Garnish with toasted coconut and a tiny lime wedge if you like.