Your questions is sort of like:
"I want to build a Thing."
"What is the Thing supposed to do?"
"I dunno, I just want to build it."
If you know how to set response headers, you know how to implement HEAD. Fetch the same information you would fetch for a GET, and just return the headers.
Read up on CORS
to see what headers should be returned for a CORS OPTIONS request.
The HTTP TRACE method is normally used to return the full HTTP request back to the requesting client for proxy-debugging purposes. An attacker can create a webpage using XMLHTTP, ActiveX, or XMLDOM to cause a client to issue a TRACE request and capture the client's cookies.
Note the security vulnerability.