"On mind" vs "in mind"
Solution 1:
I don't think in your mind would be used as in your example. However we do say:
- Do you have anything in mind?
which means "What is it you are thinking of?" or "Do you have a preference/suggestion?"
Want to go out for lunch?
Sure. What do you have in mind?
How about that new Thai place?
in your mind is used to mean "in your imagination".
I swear, that guy is after me.
Oh relax, it's just in your mind.
And on your mind indicates worry or preoccupation.
You look worried. Do you have anything on your mind?
Solution 2:
When something or someone is on your mind, it means that you think and worry about this thing or person a lot.
When you have something or someone in your mind, you just think of this thing or person without the worrying connotation.
Solution 3:
When speaking of, or asking about, what someone is thinking (or planning to do), overwhelmingly the most common wording is to ask what they have in mind (never have on mind)...
I can't use a chart to show the difference between have in your mind and have on your mind, but normally the in version reflects the above thinking, planning sense. The on version is only used in respect of obsessive, troubling thoughts which are preying on your mind. Sometimes rather less extreme - not so much oppressive as ever so slightly bothersome. Just things which for some reason you're diffident about saying to other people.
OP's Do you have anything in your mind? would not normally be used in any context - except maybe facetiously, to mean something like Do you not have any ability to think at all? The second version would be normal phrasing if you had reason to suspect something might be bothering the other person, but weren't sure. If you knew something was wrong you'd ask What's on your mind?
Solution 4:
The difference may not be sharp clear. Considering in and on, "mind" can be used in these patterns: in mind, in or on my/your/his mind.
"In your/my/his mind" may mostly imply activities including "memory", "recollection", "remembrance", "plan", "intention" e.t.c.
He spent the next hour going over the trial in his mind.
on your mind, on the other hand, may imply "busyness", "thinking a lot" e.t.c - which may mean "worry about" or " to have something to say" or something else as a "result"
I have a lot on my mind at the moment