Prep: Heat oven to 350°F (175°C). Line a 12-cup muffin pan with liners.
Lightly toast the topping coconut on a baking sheet for 5–7 minutes, stirring once, until golden. Cool.
Make the cupcakes: In a large bowl, whisk flour, sugar, baking powder, and salt. In another bowl, whisk eggs, coconut milk, whole milk, oil, vanilla, and coconut extract.
Add wet to dry and whisk just until smooth. Fold in shredded coconut.
Bake: Divide batter among liners, about 3/4 full. Bake 16–19 minutes, until the tops spring back and a tester comes out clean.
Cool in pan 5 minutes, then transfer to a rack to cool completely.
Cook the filling: In a saucepan, whisk sugar and cornstarch. Add coconut milk and whole milk; whisk smooth. Cook over medium heat, stirring, until thick and bubbling, 4–6 minutes.
In a bowl, whisk egg yolks. Slowly whisk in 1/2 cup of the hot mixture to temper, then return to the pot. Cook 1–2 minutes more, stirring, until glossy and thick.
Finish the custard: Remove from heat.
Stir in butter, vanilla, coconut extract, and shredded coconut. Transfer to a bowl, press plastic wrap onto the surface, and chill until cold and set, about 1–2 hours.
Whipped cream: Beat heavy cream, powdered sugar, and vanilla to medium peaks. Keep chilled.
Fill the cupcakes: Use a small knife or cupcake corer to remove a 1-inch plug from the center of each cupcake (don’t cut through the bottom).
Spoon or pipe in the chilled coconut cream. Replace a bit of cake on top if desired.
Top and finish: Pipe or spoon whipped cream over each cupcake. Sprinkle generously with toasted coconut.
Serve chilled or slightly cool.