Different situations require different strategies.
Plan them as your regular recurring expenses. Just set a "repeat until date" option for loans.
Just create a new account (for example, "Johny owes me"). Then transfer the amount from one of your other accounts to Johny's debt account (for example, from "Cash" account).
When Johny returns you the money, just make a new transfer, for example from "Johny owes me" to "Cash".
If you do want to reduce your available money by Johny's debt, then mark "Johny owes me" account as "off-budget". This will lower the balance of "HoneyMoney" envelope by that account's balance.
Sometimes you don't want to track Johny's debt with a new account. For example, the debt might be small ($20). Then you can just record it as an expense. And plan the same income some time in the future. This will affect your statistics a bit, but you can always delete that expense/income later if you want to.