In the manga Bloom into You (やがて君になる) there is a scene where the main character is angry at her senpai and yells out, 先輩のバカ!
From context I can clearly tell this means, "Stupid senpai!" or "Senpai is stupid!". However I can't understand why you'd use the の particle here. I understand の is a possessive particle, so 先輩の車 is "Senpai's car", or "car of senpai". But "Senpai's stupid (stupid belonging to senpai)" or "Stupid of senpai" makes no logical sense to me.
バカ is a な-adjective, so wouldn't you say, "バカな先輩" to say, "Stupid senpai"? Or even, "先輩がバか(だ)? (Senpai is stupid). The only similar thing I've learned so far is the construction for a sentence like, "this is my wife, Keiko", 家内の恵子です、in this case the way I've justified it in my head is, "This is Keiko, belonging to the thing called wife". But even this wouldn't make sense, if this were the construction being used, it would be, バカの先輩, "senpai belonging to the category called stupid".