Only if you actually refer to it in metaphor. Otherwise it's probably too oblique a reference.
If I was marking, I wouldn't get the connection between: this character feels restricted -> the author is referencing the nature of libraries.
A murder takes place on the steps of a library.
An adopted boy finds out his birth mother works in a library just down the road
A couple first meet while taking shelter under the veranda of a library
A time capsule is opened, that was buried in front of a library
The local library burns down...
I probably wouldn't use that symbolism, because fish are inherently water-based, and not something you associate with heat.
But if you insist:
The heat bit at my skin like piranhas as I trudged through the amber sand.
Alliteration continues that sense of rhythm as well. It can also be use to highlight commonalities, and reveal differences.
e.g.
Sebastian had six siblings: Sally, Sarah, Shane, Sammy, Saxon, and Jeff. Nobody liked Jeff.