Why is 'good friends' in the genitive case here? I thought that the genitive case was used for negative sentences, after certain prepositions and to indicate possession. In this example, what exactly do the 'good friends' possess that puts them into the genitive case?
It is called a partitive genitive. It is used for phrases that require "of" to complete the meaning of a word consisting of "parts." e.g. part of, piece of, half of, group of, mass of, bag of, handful of, etc.