Let $M$ be a finitely generated $K[x]$-module with the set of generators $\{b_i\}$ of minimum cardinality. Let $K[x]^n$ be the free graded $K[x]$-module of rank $n$ with the standard grading and basis $\{e_i\}$.
Now define a homomorphism of modules $\phi:K[x]^n \rightarrow M$ by setting $\phi(e_i)=b_i$. Since $\{b_i\}$ generates $M$ this is surjective and by the First Isomorphism Theorem for modules we have $K[x]^n/\ker{\phi} \cong M$. Since $K[x]^n$ is a free module over a PID of finite rank, and $\ker{\phi}$ is a submodule, than $\ker{\phi}$ is free of rank $m\leq n$, and moreover there is a basis $\{y_i\}$ of $K[x]^n$ such that $a_1y_1, a_2y_2, ..., a_my_m$ is a basis for $\ker{\phi}$, for $a_i \in K[x]$. One can find a proof of this in Dummit & Foote - Theorem 4 (p. 371), and a lot of other places. It is also evident that $(a_i)$, for $1 \leq i \leq m$, are ideals in $K[x]$, and since it is a graded PID they are of the form $(x^n)$.
Now we define a surjective homomorphism $\varphi$
$$\varphi: K[x]y_1 \oplus \cdots\oplus K[x]y_n\rightarrow \Sigma^{\deg(y_1)}K[x]/(x^{q_1}) \oplus \cdots\oplus \Sigma^{\deg(y_m)}K[x]/(x^{q_m}) \bigoplus_{i=1}^{n-m} \Sigma^{\deg(y_{m+i})}K[x]$$
by mapping $(\alpha_1y_1,...,\alpha_my_m) \rightarrow (\alpha_1\bmod(x^{q_1}),...,\alpha_m\bmod(x^{q_m}),\alpha_{m+1},...,\alpha_{n})$.
$\Sigma^n$ is an $n$-shift upward in grading.
Now the kernel of $\varphi$ is obviously $K[x]x^{q_1}y_1\oplus \cdots \oplus K[x]x^{q_m}y_m$ which is isomorphic to $\ker \phi$, and therefore the image of $\varphi$ is isomorphic to $M$: $$(\bigoplus\limits_{j=1}^{m} \Sigma^{\deg(y_j)}K[x]/(x^{q_j})) \oplus (\bigoplus\limits_{i=1}^{n-m}\Sigma^{\deg(y_{m+i})}K[x])\cong M.$$
Best Answer
I will just take a guess that you mean $M$ is finitely generated, not finite.
Pick a set of homogeneous generators $g_1, \ldots, g_n$ of $M$ such that $g_i \in M_{m_i}$. For any $g_i$, $\varphi(g_i) \in \bigoplus_{j=1}^{k_m} N_{n_{i,j}}$, i.e., degrees seen by applying $\varphi$ to $g_i$ are $n_{i,j} - m_i$. Since $\varphi$ is completely determined by $g_i$, we know that $\varphi \in \sum_{i,j} \hbox{Hom}_{n_{i,j} - m_i}(M, N)$. (I use "sum" because there might be duplicates.)