It's a sloppiness of notation that is very common in physics. In reality, you have
$$ |f(x)\rangle = \sum_{n} c_n |\psi_n\rangle. $$
If all of the $|\psi_n\rangle$ are linearly independent you can write
$$ |f(x)\rangle \rightarrow \left[ \begin{array}{c}
c_1 \\
c_2 \\
\vdots \end{array}\right], $$
where the arrow means that the vector is represented by the column vector, but they're not the same. This is especially true if the $|\psi_n\rangle$ are not orthonormal - when they are orthonormal, the inner product on the vector space is faithfully reproduced by the matrix multiplication with the conjugate transpose of the coefficient matrices. That is, if
\begin{align}
|\phi(x)\rangle &= \sum_n p_n|\psi_n\rangle \rightarrow \left[\begin{array}{c}
p_1 \\
p_2 \\
\vdots \end{array}\right] \Rightarrow\\
\langle \phi(x)|f(x)\rangle & = \sum_{m,n} p_m^* c_n \langle\psi_m|\psi_n\rangle \tag1\\
&=\sum_{m,n} p_m^* c_n \delta_{m,n} \\
&=\sum_{n} p_n^* c_n \\
&= \left[\begin{array}{ccc} p_1^* & p_2^* & \ldots \end{array}\right] \left[ \begin{array}{c}
c_1 \\
c_2 \\
\vdots \end{array}\right].\tag2
\end{align}
The reason for saying that the matrix representation and the bra/ket representation are not exactly the same is because if you don't have $\langle\psi_m|\psi_n\rangle= \delta_{m,n}$ (orthonormality) then the matrix multiplication in (2) wouldn't equal the sum in (1). Linear independence of the $|\psi_n\rangle$ is the necessary and sufficient condition for all the $c_n$ to be uniquely fixed by $|f(x)\rangle$ and $\left\{|\psi_n\rangle\right\}$, and orthonormality implies linear independence.