No, that adds a new item to the array. The new item is an array with 1 item in it, "trackPageView". So, if _paq was an empty array, then _paq would be "trackPageView". trackPageView is a value, not a key.
No, that's getting the first script tag on the page, so it assumes there's at least one. getElementsByTagName returns a collection of elements, so it's getting the first element in that collection. Later it uses that script element as the reference to insert the new one.
It would look like this:
Note that the entire function expression needs to be wrapped in parentheses: