Your intuition is exactly right. If $I$ is a set and you have a collection of sets $X_i$ for each $i \in I$, then the cartesian product is like a tuple. For example, in the case where you have two sets, $X_0$ and $X_1$, your index set is the finite ordinal $2 = \{0,1\}$. $X_0 \times X_1 = \{(a,b) : a \in X_0 \text{ and } b \in X_1\}$. Another way of thinking about this is $X_0 \times X_1$ is the collection of all functions from $2 = \{0,1\} \rightarrow X_0 \cup X_1$ such that $f(0) \in X_0$ and $f(1) \in X_1$. Instead of tuple, the cartesian product here is a correspondence $f$ between the index set $2 = \{0,1\}$ and an element such that $f(i) \in X_i$ for $i \in \{0,1\}$.
Now to generalize, you want the cartesian product to be the set of correspondence between the index set $I$ and elements in $\bigcup_{i \in I} X_i$ such that $f(i) \in X_i$. So formally, the cartesian product $\prod_{i \in I} X_i = \{f : I \rightarrow \bigcup_{i \in I} X_i : f(i) \in X_i\}$. As you can see, this is a generalization of the tuple concept.
The cartesian product of two sets : $X,Y$ is a set $Z$ defined as :
$Z = \{ (x,y) \, | \, x \in X \, \text {and} \, y \in Y \}$
where $(x,y)$ is the ordered pair having $x$ as first component and $y$ as second component.
Thus, the cartesian product $X \times Y$ is the set of all ordered pairs with first component in $X$ and second component in $Y$.
A relation $R$ with domain in $X$ and range in $Y$ is a subset of the cartesian product $X \times Y$, i.e. :
$R \subseteq X \times Y$.
Thus, a relation is a set of ordered pairs.
A function $F$ is a relation satisfying the ("functionality") condition :
if $(x_1,y_1) \in F$ and $(x_1,y_2) \in F$, then $y_1=y_2$.
A binary operation $f : Y \times Y \to Y$ is a function from the cartesian product $Y \times Y$ to the set Y, i.e. a subset of $(Y \times Y) \times Y$, because it "maps" an ordered pair $(y_1,y_2)$ into an element $y_3$, with $y_i \in Y$.
You can try to clarify the definitions with some simple examples.
Let $\mathbb N = \{ 0, 1, 2, ... \}$ the set of natural numbers.
Consider the cartesian product $\mathbb N \times \mathbb N$ and :
the relation $<$ ("Less then"), i.e. $(n,m) \in L$ iff $n < m$,
the function $s$ ("Successor"), i.e. $(n,m) \in S$ iff $m=s(n)$
the (binary) operation $+$ ("Plus"), i.e. $((x,y),z) \in P$ iff $z=x+y$.
Best Answer
You mean that functions are formally defined as sets of ordered pairs. Thus, if $I=\{0,1,2\}$ and $X_0=X_1=X_2=\{a,b,c\}$, one member of $\prod\limits_{i\in I}X_i$ is the function $\{\langle 0,a\rangle,\langle 1,b\rangle,\langle 2,a\rangle\}$. You're asking, I take it, how to square this with the idea that a member of $\prod\limits_{i\in I}X_i$ 'ought' to be an ordered triple, for instance $\langle a,b,a\rangle$.
The answer depends on how we choose to define ordered n-tuple. One way, for $n>2$, is to define it as a function whose domain is $\{0,1,\dots,n-1\}$. If we do that, $\{\langle 0,a\rangle,\langle 1,b\rangle,\langle 2,a\rangle\}$ is an ordered triple.
Another approach is to define ordered triples to be ordered pairs of the form $\langle \langle a_0,a_1\rangle,a_2\rangle$, ordered $4$-tuples to be ordered pairs of the form $\langle\langle\langle a_0,a_1\rangle,a_2\rangle,a_3\rangle$, and in general to define ordered $(n+1)$-tuples to be ordered pairs of the form $\langle\pi,a\rangle$, where $\pi$ is an ordered $n$-tuple. If you adopt this definition, then the members of my little product $\prod\limits_{i\in I}X_i$ aren't actually ordered triples. However, there is a natural bijection between them and the 'real' ordered triples, given by $$\{\langle 0,x\rangle,\langle 1,y\rangle,\langle 2,z\rangle\}\leftrightarrow\langle\langle x,y\rangle, z\rangle\;,$$ by means of which any statement about the one corresponds trivially to a corresponding statement about the other.
Should ordered $n$-tuples be defined in any other reasonable way, a similar situation will obtain.
The function definition may look odd at first, especially when you're dealing only with finite index sets, but it's the only really convenient way to deal with products over infinite index sets.