What is this "يا" that is added before names?
For instance: "أَهْلاً يا كَري" is "Hello, Carrie"
It grammatically indicates that you addressing the person instead of talking about them. When you are using someones name to address someone it is always used. It is very helpful if you are trying to get someone's attention!
Fun fact: In Moroccan Arabic, you take away the ي in the يا.
For example اَ صاحْبي would be "hey friend!" like you see your friend and are shouting out to them to get their attention.
Actually the Moroccan (أ) is indeed a form of the classical vocative. You can call a person by (يا) or (أ) and also (أيا) - and the second probably became more common in Morocco.
You can see it in classical poetry like Abu Firas': أقول وقد ناحت بقربي حمامة - أيا جارتا هل تشعرين بحالي