In a medium saucepan, whisk together coconut milk, milk, ⅓ cup (65 grams) sugar, coconut flakes, and salt. Bring to a simmer over medium heat.
While the milk mixture is heating, whisk together egg yolks, cornstarch, and remaining ⅓ cup (65 grams) sugar in a medium bowl until smooth. The eggs will clump up at first, but keep whisking and it will all come together. You should be able to lift your whisk and having the egg mixture come off in silky ribbons.
When the milk mixture is simmering, slowly ladle about 1 cup of the milk mixture into the eggs, whisking constantly with your opposite hand. Pour the tempered egg mixture back into the saucepan with the simmering milk and whisk for 30 seconds over medium heat, until the mixture begins to thicken and sputter a bit. Remove from heat and stir in butter and vanilla extract until everything is combined.
Stir the custard occasionally for the next five minutes while it cools to prevent a skin from forming. Pour into your cooled pie shell. Press plastic wrap against the top of the custard, and place the pie pan into the refrigerator to cool for 2-4 hours.