Preheat oven to 350°F with a rack in the center. Grease a 9×9 inch or 8×11 inch baking pan and set aside.
Combine flour, baking powder, baking soda, and salt in a bowl and set aside.
Using a hand or stand mixer with paddle attachment, beat softened butter or vegetable oil with sugar. If using butter, mix for 1-2 minutes; if oil, mix for about 30 seconds.
Add eggs one at a time, then blend in vanilla and almond extracts until combined, scraping bowl sides as needed.
Add half the dry ingredients to the wet mixture and beat until just combined. Stir in sour cream and milk, then add remaining dry ingredients. Fold in cranberries gently with a rubber spatula.
Pour batter into prepared pan and smooth the surface.
Mix butter, sugar, flour, and almond extract with a fork until butter is mashed into dry ingredients. Stir in sliced almonds and sprinkle evenly over the batter.
Bake for 28 to 38 minutes, beginning to check at 28 minutes, until a toothpick inserted in the center comes out clean or with moist crumbs. Cool on a wire rack.
Whisk powdered sugar, milk, and almond extract together. Adjust consistency by adding powdered sugar to thicken or milk to thin. Drizzle over cooled cake.