Standard market practice among some lending institutions is to sell a number of loan accounts to 3rd party investors, optionally still managing them but taking the loans off their books.
This can be done in full i.e. investor buys 100% of a number of loans, but it also can be done partially i.e. an investor buys 30% of a number of loans.
In this partial case there are some considerations
The institution retains loan management and ownership of the remainder %
This partial sale can occur at any point of the loan lifecycle and the % can increase or decrease as investors might want to buy more or sell back their fractions
The system must keep track of the buying and selling, the % of ownership by investors and on the lender's own books
Loan Repayments should be split into the portion belonging to the bank and to the investor
Accounting wise the % still owned by the bank and of every transaction should be booked and represented fully, while the % owned by investors should be off books