«الْمَجَازُ: الْكَلِمَةُ الْمُسْتَعْمَلَةُ فِي غَيْرِ مَا وُضِعَتْ لَهُ ... مَعَ قَرِينَةِ عَدَمِ إِرَادَتِهِ»
Figurative usage employs a word for a sense other than its assigned sense, together with an indication that the original sense is not intended.
The relation (ʿalāqah) licenses the transferred meaning, whereas the contextual indicator (qarīnah) prevents the literal interpretation. “I saw a lion on the field” is not necessarily a metaphor; without a human-referent indicator it might be an actual lion.
Using an unrelated expression at random is not a valid figurative transfer.