Combine the chopped pistachios and the milk in a saucepan. Over medium heat, bring just to a simmer. Turn off the heat, and let steep for 2 hours.
Pour the milk through a strainer, but don't discard the pistachios, as you'll be using them to make pistachio butter.
Make the custard ice cream base.
In a saucepan, whisk together the pistachio-flavored milk, 1 cup of the heavy whipping cream, egg yolks, sugar, vanilla and almond extracts. Over medium heat, warm the custard mixture just until hot and beginning to steam, but don't bring to a boil. Remove from the heat, and pour through a strainer to remove any bits of cooked egg.
Cover the custard and refrigerate until well chilled, preferably overnight.
Make the pistachio butter.
Meanwhile, run water over the strainer filled with the chopped pistachios to rinse off the milk. Scrape the pistachios into a food processor. Process the nuts until they smooth out into a creamy paste, similar in texture to peanut butter. This step will take about 10 minutes, and you should run your food processor for about 30 seconds at a time, scraping down the sides frequently, and letting the motor rest for a few seconds before you run it again.
When the pistachio butter is ready, scrape it into a jar and refrigerate until needed. If desired, add a little salt to taste.
Churn the ice cream.
Use an electric mixer to whip the remaining 1 cup of heavy whipping cream until soft peaks form that hold their shape. Take the bowl of chilled custard ice cream base and gently whisk in the whipped cream, then whisk in 1/4 cup of the pistachio butter (save the rest of the pistachio butter for another recipe).
Churn the ice cream in your ice cream maker according to the manufacturer's instructions. During the last minute of churning, add the vodka, if using.
When the ice cream is finished churning, fold in the brownie chunks and chopped chocolate.
Transfer the ice cream to a lidded ice cream container and freeze until firm, at least 8 hours.