Place milk, half and half, sugar, and salt in a large saucepan and heat over medium heat. While it's heating, whisk the egg yolks and cornstarch together for 1 minute. Once the milk is hot but not boiling, remove from heat and add about ¼ cup to whisked yolks to slowly warm them up. Slowly add the rest of the warm milk to the yolks while whisking. Pour the mixture back into the saucepan.
Place the saucepan over medium heat and continue to whisk as the mixture heats up. Don't stop whisking or the milk will burn at the bottom of the pan. Continue cooking until the mixture thickens, about 5-7 minutes. Once it started to get thick, turn down the heat to medium low and continue whisking until the mixture gets to the consistency of pudding, about 2 minutes. Remove from heat and continue whisking to remove the steam.
Add the coconut, butter, and extracts and whisk together until the butter melts completely. Place plastic wrap directly on the pastry cream and refrigerate until completely cooled, about 6 hours.
Once the cream is cooled, it's time to assemble the cake. Cut the tops off the cake if it is domed. You want them to be completely flat or else the layers will slide when assembled. Add half of the pastry cream to the bottom cake layer. Spread evenly, leaving about ½ inch clear from the sides. Add the next layer of cake on top and repeat with remaining pastry cream. Top with last layer of cake. Refrigerate for 1 hour.
Remove from the refrigerator and clear off any pastry cream that has dripped down the cake and discard it. Now it's time to frost the cake.