Suppose we have a computable structure $M$ and we want to show that its index set $I(M)$ is (many-one) $\Gamma$-hard for some complexity class $\Gamma$ (like $\Sigma^0_2$). To do this, we need to show that for any $S \in \Gamma$ there is a computable $f : \mathbb{N} \rightarrow \mathbb{N}$ such that $f(n) \in S$ if and only if $n \in I(M)$.
Now in the literature, a common argument to show $\Gamma$-hardness of $I(M)$ is to show that for any set $S \in \Gamma$, there is a uniformly computable sequence of computable structures $M_i$ such that $M_i \cong M$ if and only if $i \in S$. It seems intuitive that constructing such $M_i$ is enough to show that $S \le_m I(M)$, but I want to know explicitly what the many-one reduction $f : \mathbb{N} \rightarrow \mathbb{N}$ is in this case.
Suppose we have a uniformly computable sequence $M_i$ as described above. Given an $n \in \mathbb{N}$, the $M_i$ gives us an algorithm $A$ to construct $M_n$. In theory, if we describe precisely how to compute the index of a computable function, then in particular we can compute the index $e \in \mathbb{N}$ of the algorithm $A$ that enumerates the atomic diagram of $M_n$. Using this $e$, we can decide whether $n \in S$ simply by looking at whether $e \in I(M)$.
So is the function that maps $n \in \mathbb{N}$ to the index of the algorithm that enumerates $M_n$ a many-one reduction from $S$ to $I(M)$? Does that make sense?
First of all, your $f$ is going the wrong way: we should have $n\in S\iff f(n)\in I(M)$, since we're reducing $S$ to $I(M)$.
Other than that, though, you're right: when you say "a uniformly computable sequence $K$ of computable structures," what you mean is "a computable function $f:\mathbb{N}\rightarrow\mathbb{N}$," where the idea is that the $n$th element of $K$ is the structure with index $f(n)$. So yes, the statement "the $n$th element of $K$ is $\cong M$ iff $n\in S$" is just the statement "$f(n)\in I(M)\iff n\in S$," which is exactly saying that $f$ is a many-one reduction from $S$ to $I(M)$.