If there is a measure $\mu$ on a $\sigma$-algebra over the index set $I$ such that $\mu(I)=1$ and if the indexing function $f\colon I\to S$ is measureable, then you can define $\operatorname{avg}(S)=\int f d\mu$.
Your case "all, but finitely many are identical" corresponds to any measure for which $\mu(A)=0$ if $A$ is finite. Though one might have $\mu(\{a\})>0$ for finitely many indexes $a\in I$, this would not fit with your requirements that there be no ordering on $S$, which I read to mean that we want our measure to be invariant under arbitrary(?) permutations of $I$. In that case, $\mu(A)$ should only depend on $|A|$, hence $\mu(I)=1$ and $|I|=\infty$ does indeed imply $\mu(A)=0$ for all finite sets and in fact even for countable sets (because the union of two disjoint countables is still countable). That would indeed make all functions measurable that are constant on the uncountable index set up to at most countably many exceptions (and the average is then the value taken on the remaining vast majority of index positions).