About preimage of a function. I'm trying to show that $f(f^{-1}(E))= E$ is not necessarily true. I want to use a non-injective function as an example, but what I want to know is if I can consider $E$ to be a set which is not a subset of the range of $f$. If so, I'd like to know why. Thank you!
Yes you can consider $E$ to be a set which is not a subset of the range of $f$. In fact $f(f^{-1}(E))\neq E$ if and only if $E$ is not a subset of the range. This is because $f(f^{-1}(E))=\text{range}(f)\cap E$ (can you prove it?).
This picture should avail. $a \in$ set X. $b, c \in$ set $Y.$ Your $E$ is my $S$ and $S \subsetneq Y$ here. 

The pink bespeaks both $f^{-1}(S)$ and $f: X \to Y$ defined by $f(a) = b$. The green point is $c \in Y$. 

Then $f(f^{-1}(\{c\}))=f(\varnothing)=\varnothing\neq\{c\}\quad\text{and}\quad f(f^{-1}(Y))=f(\{a\})=\{b\}\neq Y$.