Suppose we consider a function $f(x)$ defined from an open interval say $(a,b)$ to some set $T$. When would the set $T$ be an open interval?
To give some sense to how little can be said without any further restrictions on the function, consider this: There exists a map $f\colon(0,1)\to(0,1)$ which maps every nonempty open subinterval of $(0,1)$ onto $(0,1)$.
I don't know if such a function can be given explicitly, but here is an existence proof ultimately relying on the axiom of choice:
Write $x\sim y$ if $x-y$ is rational. Then $\sim$ is an equivalence relation on $(0,1)$. Write $E$ for the set of equivalence classes. Then the cardinality of $E$ equals that of $(0,1)$, because each equivalence class is countable. In particular there is an onto map $F\colon E\to(0,1)$. Define $$f(x)=F([x])$$ where $[x]$ is the equivalence class of $x$.
Now given any $y\in(0,1)$ and $0<a<b<1$ there is some $x\in(0,1)$ with $F([x])=y$. We can certainly find some $x'\in(a,b)$ with $x'\sim x$, so that $f(x')=F([x'])=F([x])=y$. Hence $f$ maps $(a,b)$ onto $(0,1)$ as claimed.