Finally, I understand why sometimes ah and ya are used after a person’s name. (thanks to my Korean friend)
It is used between friends and it is definitely informal. It could also be used when speaking to someone who is younger (children, student, niece, nephew and etc.)
야 [ya] is used for names without a final consonant.
홍기야 – Hong Ki ya
신혜야 – Shin Hye ya
If you watch 1 night 2 days, you would recognise SEUNG GI YA!
아 [ah] is used for names with a final consonant.
근석아 – Keun Suk ah
하늘아 – Ha Neul ah
Edit: added in some extra information.