Preheat oven to 350 degrees. Line 20 to 24 cupcake cups with paper liners.
Thoroughly whisk or stir together the flour, cocoa powder, baking soda, and salt, whisking out any lumps.
With an electric mixer on medium-high speed, cream butter and sugar until pale and fluffy. Add eggs, one at a time, beating until each is incorporated, scraping down sides of bowl as needed. Beat in vanilla. Reduce speed to low. Add flour mixture and buttermilk alternately, stirring until blended. Lastly, stir in the cooled melted chocolate.
Divide batter evenly among prepared cups, filling each about ¾ full. Do not overfill, as they will rise quite a bit. Bake for 20 to 22 minutes, then transfer to wire racks to cool. After about 10 minutes, remove from cupcake tins.
To assemble cupcakes, scoop out a little cake from the center to make a small (about 1 inch wide and ½ deep) well. Add a spoonful of coconut-pecan mixture heaping it so it comes up in the middle.
Once all of the cupcakes are filled, make your chocolate icing and pipe it around the edge.