Throughout the rest of Kings it seems perfectly normal for the narrator to give the name of any particular king (e.g. Ahab), even when that particular king is wicked (e.g. Ahab). But in 2 Kings 5-7, the king of Israel is simply called "the king" or "the king of Israel" throughout the text rather than being specifically named. What then is the literary purpose of this?
Verse 5 is the King of Aram talking. It is a cliche / convention that King 'a' refers to King 'b' as 'The King of X'. Once the pattern is set, the narrative sticks with it.
It has nothing to do with whether the king in question is good or bad.
It is also possible that this story was once told as 'once upon a time ...' and wasn't actually tied to a specific, named, king, but that seems less likely to me.