How to Make It
Heat the oven to 350°F. Line a standard 12-cup muffin tin with paper liners. Combine the flour, the baking powder, and the salt in a medium bowl. Add the butter and the sugar to a large bowl and beat with an electric mixer until fluffy, about 4 minutes. Add the eggs and egg yolks, one at a time, then the vanilla. Add the flour mixture and the buttermilk into the sugar and egg mixture in increments, starting and ending with the flour mixture. Stir in the coconut and the raspberries. Don’t worry if the raspberries break a bit.
Divide the batter between the liners. Bake until a toothpick inserted into the center of the cupcakes comes out with just a few moist crumbs, 22 to 25 minutes. Transfer cupcakes to a rack to cool completely.
Prepare the buttercream: Whisk together the sugar and the egg whites in the bowl of a stand mixer or a large bowl. Set the bowl over a pot of barely simmering water, making sure the bottom of the bowl doesn’t touch the water. Continue whisking until the sugar is completely dissolved and the mixture is warm. Remove the bowl from the heat and using the stand mixer or a hand mixer, beat the mixture until it forms stiff, glossy peaks and has cooled to almost room temperature, about 5 minutes.
Reduce the speed to medium/low and add the butter, a piece or two at a time, beating until smooth. Beat in the jam. Don’t worry if the mixture is loose, it will firm up as you continue to beat it. If it curdles, and doesn’t smooth out over time, apply a little gentle heat to the underside of the bowl. (A hair dryer or a dish towel soaked with hot water works well.) Once the mixture is smooth, transfer it to a piping bag fitted with a large, open star tip. Top the cupcakes with tall swirls of frosting.