If you have something on your mind, there's something worrying or making you think. What's in your mind is just waht you're thin king about at the moment or your current opinion about something.
I'd use 'in the park'. With open spaces like parks, gardens and fields, spaces that have a limit, use 'in'.