For the cupcakes: Preheat the oven to 350 degrees F. Line two cupcake pans with 15 cupcake liners, spacing them out evenly between the two pans.
Sift together the flour and baking powder in a medium bowl, then lightly stir in the salt and set aside. Combine the heavy cream and 1/2 cup corn in a food processor and puree until smooth, being careful not to overblend so the cream doesn't turn into butter. Add the sour cream and blend just to combine, then set aside.
Cream together the butter, coconut oil and granulated sugar in a stand mixer fitted with a paddle attachment on medium-high speed, scraping down the sides occasionally with a rubber spatula to make sure everything is incorporated evenly, until light and fluffy, 3 to 4 minutes. Add the eggs, one at a time, beating well after each addition. Add the vanilla. Reduce the mixer to medium-low and add the dry mixture and corn puree mixture in 3 alternating additions, then fold in the remaining 1/2 cup corn kernels with a rubber spatula. Using an ice cream scoop, distribute the batter evenly among the cupcake liners.
Bake for 10 minutes, then rotate the pans and continue to bake until the cupcakes are thinking about starting to turn brown and a toothpick inserted in the center comes out with a few crumbs on it, 6 to 10 minutes more. If the cupcakes need more time, continue to bake and check them frequently (like every 30 to 45 seconds). Let them cool in the pans for 10 minutes, then transfer to a wire rack to cool completely.
For the buttercream: If desired, press the cranberry sauce through a fine-mesh sieve to get rid of the cranberry skins, which will yield a smoother buttercream. This step is not necessary, though. Beat together the cranberry sauce, butter and cream cheese in a stand mixer fitted with the paddle attachment, until smooth. Add the powdered sugar, salt and vanilla and continue beating until combined. Beat in the heavy cream. Transfer to a piping bag.
To assemble: Use an apple corer to extract the centers of the cupcakes. Transfer the thick cranberry sauce to a piping bag or resealable plastic bag with the corner snipped off, then pipe it into the centers of the cupcakes. Pipe a blob of frosting onto the cupcakes and decorate with sliced cranberries and rosemary sprigs. Enjoy! These are best enjoyed within a day or two.