In the current conflict between Armenia and Azerbaijan, Turkey supports the latter. What made them choose one over the other?
As a Turk, my guess would be historical and ethnic links. I hear the phrase ''We are 2 different states but we are the same nation'' all the time in social media, kind of like China and Taiwan. The only difference is that Azerbaijan and Turkey have very similar ideologies.
What did you even expect? Who can Turkey trust, not only in that area, but in the whole world? Ties with the USA aren't getting any better since the Brunson crisis, Russia is a very strategic superpower that only looks for its interests, Justice and Development Party (AKP) always talks trash about EU to gain support from the conservatives and ultra-right...
Turkey's only eternal friends are Pakistan and Azerbaijan.
Turkey and Azerbaijan have historical and cultural links.
They are both Muslim countries engaged in a long term dispute with Orthodox Christian countries.
Between 1914 and 1923 there was a series of expulsions and massacres collectively known as a the Armenian Genocide, in which about 1.5 million Armenians, then under Turkish/Ottoman rule died and many more were displaced. Since then Turkey has been an enemy of Armenia.
The Azerbaijani language is not only a Turkic language like Turkish but even shares the same Western Oghuz subgroup. This points to a long common history of the ancestors of modern Azerbaijani and Turkish speakers. There still seems to be a reasonable degree of mutual intelligibility between speakers of Turkish and Azerbaijani. In addition, Azerbaijanis like Turkish are considered a Turkic people, meaning they did not supplant a previously spoken language when acquiring a Turkic one but are most likely part of the original Turkic speakers. Finally, both peoples are overwhelmingly muslim, adding to their shared identity. It is believed that the ancestors did not settle in Anatolia or the Caucasus region until the Middle Ages.
By contrary, Armenian is an Indo-European language, a completely different language family. Armenians have settled the Caucasus region since at least antiquity, with some sources saying up to 4000 years – this already means that they are a different people than the Turkic peoples of the previous paragraph. The possibly final nail in the coffin is the fact that Armenians have long been christians – they are credited as the first state to adopt Christianity and the Old City of Jerusalem has a traditional Armenian Christian quarter beside the Jewish, Muslim and Christian quarters.
Finally, one cannot touch on the question of Turkish-Armenian relations without mentioning the Armenian Genocide. There is far more to be said about this topic than would fit into a single answer but extremely briefly tensions had been building up between the Turkish majority and the Armenian minority in the Ottoman empire which led to a series of smaller preceding massacres starting in the 1890’s and finally to a significant purge which left around 1.5 million Armenians dead by 1923. Turkey and Azerbaijan both deny that this genocide happened (or maybe they merely object to calling it a genocide) which, as you may imagine, is a bit of a difficult issue between Turkey and Armenia.
Tl;dr: there is next to nothing outside a longer shared border to suggest Turkish support of Armenia but there are tons of reasons for Turkey to support and be allied with Azerbaijan.