In my opinion, you are dealing with two separate loan requests as outlined in your second scenario. Your borrower initially asked for funds to complete a purchase, but then didn't follow through. If the purchase loan had already been approved by your institution, and did not close, then you have a HMDA reportable transaction that was Approved, Not Accepted. (assuming the property to be purchased with the loan had a dwelling and was going to be secured by a dwelling.)
If they subsequently come back for an equity out loan, this is completely separate from the first loan request. The purpose is not to purchase a residence, it's not to refi a dwelling loan as the property is unencumbered, and it's not for improvements, so it's not reportable.
_________________________
Expect the worst, hope for the best and you'll never be disappointed.