"I have been at infinite pains to get the words into my head" -> "the words (that) I have been at infinite pains to get into my head" "to be at pains to do something" is a set pattern of words, meaning to make a meticulous effort to do that thing. "going I don't know where" is idiomatic in a way that "going where I don't know" is not. I doubt that this can be deduced from grammatical rules
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
park sang joonI think "to get into my head" means "in order to get into my head" and "the words (that)" is an object of "get," but don't think an infinitive of adverbial phrase can take an antecedent as an object.Actually, that's possible. There are many places in a relative clause where the antecedent may fit in.
park sang joonThen I was wondering "that" is implied before "where" in "going I don't know where."No. "that" is not used in an indirect question, and "where" is simply a reduced indirect question.