Bakeable Cream for Danish

Toast

I need a recipe for a bakeable custard/pastry cream to use on Danish pastries.

Looking for one that will hold its shape, not "explode", or get completely absorbed into the pasty.

I've used several commercial ones that work great (Puratos) but I need one made from scratch.

If not available, any ideas on how I can keep the pastry "dented" so I can deposit the cream after baking?

Thank you.  I have very good pastry cream and cheese filling recipes but was hoping for an actual custard/pastry cream that actually bakes well....not easy find.