Preheat the oven to 350°F (175°C). Line 2 cupcake pans with paper liners.
In a stand mixer, beat butter, sugar, vanilla extract, lemon extract, and lemon zest on medium speed until fluffy.
Add eggs one at a time, mixing well after each addition. Mix in sour cream and milk.
In a separate bowl, whisk together cake flour, baking powder, baking soda, and salt. Gradually add the dry ingredients to the wet mixture, folding gently.
Toss raspberries in 3 tbsp cake flour and gently fold them into the batter.
Spoon batter into cupcake liners, filling each 3/4 full. Bake for 18-22 minutes, or until a toothpick inserted comes out clean.
Cool cupcakes in the pan for 10 minutes, then transfer to a wire rack to cool completely.
For frosting: Beat cream cheese and butter until smooth. Add lemon extract, juice, and zest, then gradually add powdered sugar. Beat until fluffy.
Frost cooled cupcakes and decorate with raspberries and lemon slices.