Where any person entitled to or possessed of land or entitled to a contingent right in land, either solely or jointly with any other person, by way of security for money, is a lunatic, or a person of unsound mind, or an infant, the Supreme Court may make an order vesting or releasing or disposing of the land or right in like manner as in the case of a trustee who is a lunatic, a person of unsound mind, or an infant.