Toast shredded coconut (optional): Preheat oven to 325°F (160°C). Spread shredded coconut on a baking sheet; toast 5–8 minutes, stirring once, until golden. Cool.
Make the crust: In a bowl, combine graham crumbs, melted butter, and sugar (if using). Press firmly into the bottom of a 9×13-inch baking dish (or an 8×8 for thicker bars). Use the bottom of a measuring cup to compact evenly. Bake at 350°F (175°C) for 8–10 minutes to set and deepen flavor; cool completely. (No-bake option: press firmly and chill 2+ hours.)
Prepare custard — choose one method:
Cooked cornstarch method (silky mousse-like): Whisk 2 tbsp cornstarch with 2–3 tbsp coconut milk to make a slurry. In a saucepan, warm remaining coconut milk with the sweetened condensed milk and a pinch of salt (do not boil). Whisk in cornstarch slurry and cook, stirring, until slightly thickened (3–5 minutes). Remove from heat; cool 5 minutes. Beat softened cream cheese until smooth, then gradually incorporate the cooled coconut mixture and vanilla. Whip 1 cup heavy cream to soft peaks and fold into the custard to lighten.
Gelatin set method (clean slices): Sprinkle 1¾ tsp gelatin over 2 tbsp cold water; bloom 5 minutes. Heat ½ cup coconut milk until hot, stir in gelatin until dissolved. Beat cream cheese smooth, add sweetened condensed milk and remaining coconut milk; mix until silky. Stir in dissolved gelatin and vanilla, cool to lukewarm, then fold in whipped cream.
Assemble: Pour custard over cooled crust and smooth the surface. Refrigerate at least 4 hours (overnight recommended) until set.
Make whipped topping: Whip chilled heavy cream with powdered sugar and vanilla to firm peaks. For dairy-free, scoop chilled solid coconut cream and whip with powdered sugar until fluffy.
Finish & garnish: Spread whipped topping evenly over chilled custard. Sprinkle toasted coconut, nuts, or fruit. For decorative serving, pipe rosettes or create gentle swirls.
Slice & serve: For clean slices, dip a sharp knife in hot water, wipe dry between cuts. Serve chilled with optional lime zest or passionfruit drizzle.