No, not as far as we know, and there are a couple reasons for this.
Perhaps most importantly, Mesoamerican peoples did not have any access to two essential pieces of many pastries/cakes: dairy and leavened (wheat) bread. There was no milk or butter in Pre-Columbian Aztec or Maya food at all - which would certainly make baking more difficult. There was bread, but it was limited to unleavened maize breads, such as tortillas, which are not used in pastries. Wheat and similar plants used in pastries today are species that originated in Eurasia and Africa.
I don't know all of the modern substitutes for those materials in modern vegan or gluten-free recipes, but I believe many of those substitutes are relatively recent developments, and many (such as rice or soy milk) would simply not have been geographically available to Mesoamericans.
But beyond the difficulties it would create in baking cakes and pastries, the lack of dairy in the Pre-Columbian Mesoamerican world meant that historical chocolate itself was very different from the chocolate we eat today. Most chocolate today contains some amount of milk - even dark chocolates usually have some. Mesoamerican chocolate did not. Nor was it eaten in bars; the Aztec and Maya drank hot chocolate that was
usually mixed with another ingredient (for example, water, maize, chilli and/or honey) and in different proportions to produce a variety of drinks^(1)
Mesoamericans also occasionally used chocolate for medicinal purposes.^(2) However it was consumed and in whatever contexts, it wasn't really a material that you could melt/incorporate into pastries or cakes as we do today.
^(1)Hurst WJ, Tarka SM Jr, Powis TG, Valdez F Jr, Hester TR. Cacao usage by the earliest Maya civilization. Nature. 2002 Jul 18;418(6895):289-90.
^(2)Dillinger TL, Barriga P, Escárcega S, Jimenez M, Salazar Lowe D, Grivetti LE. Food of the gods: cure for humanity? A cultural history of the medicinal and ritual use of chocolate. J Nutr. 2000 Aug;130(8S Suppl):2057S-72S.