Sam's right that your first example has an implicit condition:
It was very wrong of you to do that.
but he didn't explain what the "of" does in the sentence. It isn't "you" that's wrong. It's the action "you" took that was wrong. That's why adding the implicit part of the sentence (the part in bold) is useful. It shows what "wrong" is modifying.
"Of you" is an adjective clause that identifies who took the action. "Of" is possessive in nature in that it often means "a part of something" or "belonging to." Therefore, the action (that was wrong) belongs to "you."
It is incorrect to suggest that "wrong with" is a special case. If we use your first example, we could have said,
There is something wrong with that.
"Wrong" is an adjective modifying "that." It describes a condition of "that." There is no action taking place. However, there's at least two ways to use adjectives. One is directly, to identify a fact about the subject.
That is the wrong person.
This means the person is unsuitable for some unidentified purpose. The person (subject of the sentence) is fine (or right, or OK). There's nothing known to be wrong about the person, only that the person isn't right for some purpose.
For example, if an acting company needed an actress with red hair, but a blonde-haired woman was introduced instead, there's nothing wrong with the blonde woman, but she's the wrong person for the role.
There is something wrong with you.
This means there is something wrong with the person. Suitability for any purpose is not relevant. The person may be sick or confused or be in some other state not considered "normal," "healthy," or "right" for humanity.
To use our previous example, if the red-haired woman dyed her hair blonde before visiting the acting company, they would say there's something wrong with her. Her previous condition (before dying her hair) was what they wanted, but she changed herself, making herself wrong for the purpose. The purpose of the acting company justifies their decision, but it was something wrong with the person that was the issue.