Preheat oven to 350°F (175°C) and line a muffin pan with cupcake liners.
In a medium bowl, combine flour, cinnamon, baking soda, baking powder, and salt; set aside.
In a large bowl, whisk together sugar, eggs, oil, and vanilla until smooth and well blended.
Add the dry mixture to the wet ingredients and stir until just combined — do not overmix.
Gently fold in shredded carrots, pecans, pineapple (or applesauce), and raisins if using.
Divide the batter evenly into cupcake liners, filling each about ⅔ full.
Bake for 22–25 minutes or until a toothpick inserted in the center comes out clean. Let cool completely before frosting.
For the frosting, beat cream cheese and butter together until light and fluffy.
Gradually add powdered sugar, vanilla, and salt; mix until creamy. Beat in caramel topping until smooth.
Pipe or spread frosting on cooled cupcakes, then garnish with chopped pecans, a caramel drizzle, and one whole pecan per cupcake.