Preheat the oven to 350°F. Coat a 9×13-inch baking pan thoroughly with cooking spray to prevent sticking.
Scatter about half of the shredded coconut (approximately 3/4 cup) and half of the chopped almonds (about 1/4 to 1/2 cup) evenly across the bottom of the prepared pan to form a crisp, toasting base layer.
In a mixing bowl, beat the softened cream cheese with the softened butter until completely smooth and creamy, about 2 to 3 minutes.
Add the almond extract, then gradually blend in the sifted confectioners’ sugar until the mixture is uniform and velvety.
Fold in the remaining coconut (about 3/4 cup) until it is evenly incorporated throughout the cream cheese mixture.
Prepare the chocolate fudge cake batter according to the directions on the box. Pour the batter over the coconut-and-almond layer, spreading gently so the base is fully covered without stirring the bottom layer into the batter.
Spoon dollops of the cream cheese mixture over the surface of the cake batter, distributing them across the pan. With a knife or offset spatula, lightly swirl through the dollops using a gentle back-and-forth motion, creating a marbled look without overmixing.
Evenly sprinkle the semi-sweet chocolate pieces over the top.
Bake for 45 to 50 minutes, until a toothpick inserted into the cake portion (avoiding the cream cheese swirls) comes out with a few moist crumbs. The top may appear slightly soft, but it will continue to set as the cake cools.
Remove from the oven and allow the cake to cool in the pan for at least 30 minutes before slicing. Cut into squares and serve at room temperature or chilled.