A vector in this context is a C(++) structure that contains a "list" of elements of some C(++) type. It's somewhat similar to an array (in C terminology). A vector contains information about how long it is in a "header" structure, and it's capable of being extended or shrunk. DFHack maps DF's vectors onto Lua lists, allowing you to iterate over them (as well as modifying their lengths).
"f1" isn't located anywhere: it's a parameter to the friend_lt function, and if you look at the call to friend_lt you'll find that f1 and f2 are friends [k] and friends [l] respectively. "friends", in its turn, is a Lua vector the script builds for its own use (table.insert...), and the elements of that vector are populated by the iterator variable "relation" (using the peculiar Lua "ipairs" iterator construct). "relation", in turn, takes the value of "hf.info.relationships.list [k]", which is the value of each of the elements (in turn) of the DF vector that's part of the "hf.info.relationships.info" vector. Thus, that is the vector you're looking for.
I'm not sure this is the best place to learn Lua scripting, as manipulation of pointers in an incorrect manner is a good way to get DF to crash (and there are a whole lot of incorrect ways, and only a few correct ones). This is in addition to leaking memory by allocating memory and not freeing it afterwards (Lua is supposed to do that for its own data [although I'm skeptic and not sure it works correctly], but C(++) is inherently unsafe and all safety of almost any kind has to be added manually (or by using classes that add them, in which case you would be better off using a high level language that had safety built in).