For loans, you can enable auto numbering in global setup under Loan Setup>Loan Portfolio.  Go to the Options tab and click on Enable Auto Numbering


For contacts, you can enable auto numbering in global setup under Contact Setup>Contact Type.  Go the the Options tab then click on Enable Auto Numbering