I wandered lonely as a cloud metaphor
This is a simile and personification. Anything is a simile when you compare something using "like" or "as". Personification gives any non-living things human qualities. For example a cloud cannot wander.