First, stir together the egg yolks, sugar, and cornstarch in a bowl until it's thick and smooth.
4 large egg yolks, ¾ cup granulated sugar, ¼ cup cornstarch
In a pot on the stove, over medium heat, warm up the coconut milk and half & half until steaming.
13.5 ounces coconut milk, 1 cup half & half
Once it's steaming, add a quarter cup of the hot milk/cream to the egg mixture and whisk continuously. This is tempering the eggs to the hot temperature, so they don't scramble. Add another quarter cup of hot milk and repeat.
Reduce the heat on the stove to low-medium and slowly but steadily pour the egg mixture into the pot of milk/cream, whisking continuously.
Stir in the butter and vanilla extract, stirring frequently, and simmer until thickened, about 1 to 2 minutes.
1 Tablespoon butter, 1 ½ teaspoons vanilla extract
Remove the pot from the heat and stir in the (untoasted) coconut flakes.
1 cup sweetened shredded coconut flakes
Let cool for a few minutes.
Once both the filling and the crust have cooled, pour the filling into the pie crust and refrigerate for at least 3 hours until chilled and firm.