How are participant loan repayments applied to recordkeeping sources (e.g., pretax, employer, aftertax)?

Are loan repayments typically made back to the same sources the loan originated from?

I know loan repayments can be directed into different funds than the loan came out of; what methods of repaying by source are open to a plan sponsor?