Whisk dry ingredients: In a medium saucepan off the heat, whisk together the sugar, cocoa powder, cornstarch, and salt to remove any lumps
Add liquids: Slowly pour in the whole milk and heavy cream while whisking constantly until smooth
Simmer and thicken: Place the saucepan over medium heat. Cook while whisking continuously until the mixture thickens slightly and begins to bubble gently (about 5 to 7 minutes). It should coat the back of a spoon
Add chocolate and vanilla: Remove the pan from the heat. Stir in the vanilla extract and optional chopped chocolate until completely melted and smooth.
Cool and pour: Let the mixture cool for a few minutes, then pour it into your popsicle molds, (or tupperware for pudding) leaving a small space at the top for expansion
Freeze: Insert popsicle sticks and freeze for at least 6 hours, or until completely solid. Run the outside of the molds under warm water for a few seconds to release the popsicles.