Preheat oven to 350°.
To prepare cupcakes, beat first 4 ingredients at medium speed of a mixer until well-blended. Add carrot and pineapple; beat well. Lightly spoon flour into a dry measuring cup; level with a knife. Combine flour and next 5 ingredients (flour through nutmeg) in a bowl, stirring well with a whisk. Add flour mixture to sugar mixture; beat well. Stir in raisins.
Spoon batter into 12 muffin cups lined with paper liners. Bake at 350° for 20 minutes or until a wooden pick inserted in center comes out clean. Cool in pan 5 minutes on a wire rack; remove from pan. Cool completely on wire rack.
To prepare frosting, beat the cream cheese, butter, and coconut flavor at medium speed of a mixer just until blended. Gradually add powdered sugar (do not overbeat). Spread frosting over cupcakes; sprinkle with flaked coconut. Store, covered, in refrigerator.