Add the sugar, salt, and cornstarch to a medium sized pot, and whisk them together.
Pour in the milk, and whisk it into the sugar mixture.
Heat the mixture over medium high heat, and bring to a low boil.
Once bubbles appear, lower the temperature to medium low and cook for another 1 to 2 minutes, while stirring often, until the mixture starts to thicken
Whisk your egg yolks in a separate medium sized bowl.
Add 1/4 cup of the hot pudding mixture to the egg yolks. Whisk it together. Add another 1/4 cup of the pudding to the eggs and whisk it together.
Scoop the egg mixture back into the pudding mixture in the pot. And let the pudding come back to a low boil over medium low heat.
Once a couple bubbles pop, set a timer for 2 minutes as the mixture keeps boiling, until the pudding is thickened.
Remove from the heat and stir in the vanilla, and butter. Stir in the mashed banana if desired.
Strain the pudding through a strainer to get out any egg chunks (or banana chunks) into a large bowl.
Cover the pudding with plastic wrap, pushing the plastic wrap directly onto the top of the pudding.
Place in the fridge and chill for 20 to 30 minutes.
Spread a small amount of the pudding into the prepared pie crust.
Spread sliced bananas over the top of the pudding.
Add remaining pudding to the pie crust and cover with plastic wrap again.
Chill for at least 4 hours, up to overnight.