Prep your tools. Heat the oven to 350°F (175°C). Line a 12-cup muffin tin with paper liners. Lightly mist the liners if you want extra-easy release.
Toast the coconut. Spread 1/2 cup shredded coconut on a baking sheet and toast for 4–6 minutes, stirring once, until lightly golden.
Set aside to cool for topping.
Mix dry ingredients. In a bowl, whisk 1 1/2 cups flour, 1 1/2 teaspoons baking powder, and 1/2 teaspoon salt. This keeps the crumb even.
Cream butter and sugar. In a large bowl, beat 1/2 cup softened butter with 3/4 cup granulated sugar until pale and fluffy, 2–3 minutes. This step traps air for lift.
Add oil and eggs. Beat in 1/4 cup neutral oil.
Add 2 room-temperature eggs one at a time, mixing after each. Stir in 1 teaspoon vanilla and 1/2 teaspoon coconut extract.
Combine wet and dry. Add half the dry mix to the butter mixture. Stir gently.
Add 3/4 cup well-shaken coconut milk. Stir. Add the remaining dry mix and 1/2 cup shredded coconut.
Mix just until combined. Do not overmix.
Fill and bake. Divide batter among liners, about 2/3 full. Bake 16–20 minutes, until the tops spring back and a toothpick comes out clean or with a few moist crumbs.
Cool completely. Let cupcakes sit in the pan 5 minutes, then move to a rack. Cool to room temperature before frosting.
Make the smooth frosting. Beat 1/2 cup softened butter until creamy.
If using cream cheese, add 4 ounces softened cream cheese and beat until smooth. Gradually add 2 1/2 to 3 cups confectioners’ sugar, 1 teaspoon vanilla, and a splash (1–2 tablespoons) heavy cream or milk. Beat 2–3 minutes until silky.
Add a pinch of salt and 1/4 teaspoon coconut extract if you’d like deeper coconut notes. Frosting should be soft yet hold peaks.
Frost and finish. Swirl frosting onto each cupcake with a spatula or pipe with a large round or star tip. Sprinkle toasted coconut on top. Add citrus zest if using for a fresh pop.