Place the bowl of your ice cream machine in your freezer for at least 24 hours before beginning the recipe. Or, follow the manufacturer's instructions prior to starting.
Soak the pistachios in boiling hot water in a large bowl for at least 30 minutes, up to 1 hour.
Drain the pistachios into a colander and rinse them well. Remove as many of the fibrous skins surrounding the nuts as you can. The more you remove, the smoother the ice cream will turn out.
Separate two egg yolks into a bowl, reserving the egg whites for a different use later.
Transfer the can of coconut milk, oat milk, pure maple syrup, vanilla extract, and almond extract to a medium-sized saucepan and heat over medium-high heat. Whisking occasionally, heat the milk mixture just until it becomes steamy but doesn’t come to a full boil.
Pour about ⅓ cup to ½ cup of the hot milk mixture into the bowl with the egg yolks and whisk well to temper the eggs. Add another ½ cup of the milk mixture and mix again. Then, pour the tempered egg yolk mixture into the saucepan with the rest of the milk mixture and mix well. Use a digital thermometer to take the temperature of the mixture. If it isn’t 165 degrees F or higher, heat the mixture until it reaches 165. Stir in the gelatin (if adding) and the sea salt.
Pour the milk base into a sealable container. Seal and refrigerate until completely chilled, at least 4 hours. I chill the ice cream base overnight to be sure it is plenty cold.
Transfer the custard base and the peeled pistachios to a high-powered blender or a food processor. Blend for 1 to 2 minutes, or until the consistency is nice and creamy and the pieces of pistachio are fully blended.
When you’re ready to make the ice cream, place the frozen bowl of your ice cream maker into the machine and pour in the ice cream mixture. Churn for 10-20 minutes, or until thick and the machine begins to slow down. You can either serve immediately for a soft serve consistency, or transfer to a freezer-safe container to freeze for 2 hours (or longer) for a classic ice cream consistency. Because this recipe contains a decent amount of fat, egg yolks, and gelatin, it doesn’t require much time to thaw and should be ready as soon as you are for scooping.
Scoop into bowls and top with raw chopped pistachios and any other toppings, and enjoy!