"Мой хороший" is grammatically incorrect whether you are close or not. But this incorrectness can make an endearment more personal and cute, it's like you own inner joke. Sometimes (relatively rare) you will hear people addressing females and using male genders, and females talking about themselves as males ("Ну, я пошел!"). It has a joking ring to it. In other words it's a deliberate mistake to achieve a certain emotional response, not an exception to the rule.

Also (but it's veeeeery rare) some continuation might be implied. For example "Мой хороший (котенок)" - My good (kitty). In this case the use of "хороший" is somewhat justified: the word "котенок" is male (regardless of the kitty's gender), so an adjective describing a kitty is male too, since it corresponds to this unsaid word. But, again, it's a bit of a stretch.

"Привет дорогой мой человечек" - Hi, my dear person. "Человек" (and by extention a diminutive from it "человечек") means a human being, a person, and can be applied both to men and women.