Three questions must be answered separately: What word is uttered? What relation connects its literal meaning to the intended referent? What contextual indicator favors the transferred meaning?
In «أَرْسَلْتُ الْعُيُونَ», “eyes” can refer to spies sent to obtain information. The eye is a part of a spy, so the relation is part-for-whole (juz'iyya). Sending someone to investigate provides the contextual indication that persons, rather than detached eyes, are meant.
The same expression may be literal in one context and figurative in another. Classification depends on actual use.