Preheat oven to 350°F. Lightly grease a mini muffin pan or use silicone molds.
In a stand mixer, beat butter and sugar until light and fluffy. Mix in egg and vanilla until smooth.
Add flour, baking powder, and salt. Mix until fully combined and dough holds together.
Roll 3/4 tablespoon of dough into balls. Place in muffin wells and use your thumb or a small spoon to create an indention in the center.
Bake for 8 minutes. Edges should be set; centers may still look soft. Let cool fully before removing from the pan.
In a small bowl, whisk milk and egg yolks until smooth.
In a saucepan, whisk sugar, flour, cornstarch, and salt. Slowly pour in milk mixture while whisking to prevent lumps.
Cook over medium heat, stirring constantly, until the mixture boils and thickens (about 7 minutes).
Remove from heat. Stir in vanilla, coconut extract, butter, and shredded coconut. Let cool to room temperature.
Spoon cooled custard into cookie cups. Refrigerate for at least 30 minutes to set.
Top each with whipped cream and toasted coconut just before serving.