Firstly, the use of the translation "mind" in English. That is odd because the kidneys seem to be capable of holding strong emotion, which in English would be closer to the heart.
Secondly, the switching of the "heart" and "mind" in English to create (in my view) alignment with action of the Son of God in Revelation, especially if the Old Testament verse includes the action of searching.
So the Hebrew categories are probably different to ours. We still haven't got to the Hebrew word traditionally translated "soul", but let us try and get a better feeling for the heart and kidney categories by looking closer at the supporting language and actions.
So let us round up what "the kidneys" do:
- faint/fail/are consumed (the exact verb used in Job 19:27, כּלוּ - ka lah is predominantly linked with eyes "failing" and smoke "vanishing"). NIV gave yearning. The word has to be closer to this consistent idea of being "finished up" and used more in this way elsewhere. Further, the context needs to allow for it - Job is not expressing his deepest love for his God (or redeemer), but rather that he is being persecuted to an unbearable point by God (verse 22) that goes beyond the physical sufferings.
- are tried/probed/examined (as is the heart) [Ps 7:9 and Jer 11:20, 20:12], although Jeremiah 17:10 has hoker H2713 (searching) for Yahweh's reserved action for hearts while He keeps trying/probing/examining bohen H974 for the kidneys.
- instruct/discipline/chastise (as opposed to Yahweh who counsels) [Ps 16:7]
- are a place in which the person can be pierced/pricked (as opposed to the heart being grieved) [Ps 73:21]
- the person's primitive beginning. I already gave some comments on Ps 139:13 on the previous point, and I remain quite convinced. The psalmist also appears to be using repetition by following up kilyotay with you knit me together in my mother's womb. To begin with when God made the most central parts of me, those parts were all there were of me. This would obviously need to be investigated much more fully, but it could be that this represented the biological developmental understanding of the day. In particular (as gruesome as this sounds), research could examine if any ancient texts use kidney language to refer to miscarriages or stillborn children.
- rejoice [Pr 23:16] (as can the heart, see Ps 28:7)
- an inner place in which Yahweh can or cannot be located, independently of Yahweh's presence on a person's lips and His role in planting and establishing that person [Jer 12:2]. Compare with the similar formulation in Isaiah 29:13, where the heart (leb) is far from God (cited by Jesus).
How could we combine these kidney references?
For the Israelites, we could say, that the kidneys are the fundamental and primitive organs from which Yahweh creates humans, which He will continue to examine and in which He would like to be - within the human life source. Functionally speaking, my picture thus far of the Israelite perspective is that the kidneys can hurt in a way similar to how we see a human conscience functioning, punishing the person with some guilty feeling about a decision or behaviour, while also able to cause the person to sense triumph and rejoicing - either way, some sort of emotive response about a completed performance.
So there we have our kidneys - I hope it was helpful. Clearly there is overlap with heart and probably with "soul" too, although the preference of some translations for "mind" seems questionable to me as this is too closely tied in our modern understanding to brains. Hopefully I will be able to map the heart and soul too before long.