Let $X$ be some nonempty set. In my analysis course, a family was described as a function $f : I \rightarrow X$ where $I$ is supposed to be an "index set" and we would write the family as $(x_i)_{i\in I}$ where $x_i \in X$. Can I describe every set as a family? What are the restrictions on the "index set", can every set be an "index set"?
I'm sorry if my questions don't make much sense to set theory scholars, I have only studied naive set theory so far (Still, I'd like a highly formalized answer if possible).