does the APOR take into account primary and second homes
Not that I'm aware of.
For HMDA reporting purposes it doesn't matter if HPML applies or not. If the loan is for a consumer purpose and dwelling secured then you must report the rate spread.
If I own a 15 unit apartment building and I borrower against that building to pay for my grandson's college tuition that is a consumer purpose loan subject to Reg Z 226.18 disclosures and it is dwelling (multi-family) secured, therefore the rate spread for HMDA reporting is applicable.