It would return an array of <head> elements. There should only be one of those.
.innerHTML returns a string of everything between, but not including, the <head> and </head> tags. You may have to put it in a variable then send it back out like this.
innerhtml += "something";
arr.innerHTML = innerhtml;