As daft as a brush and its kin
Some similes make sense: for example, as coarse as hemp (or heather). Hemp and heather are indeed coarse. But cool as a cucumber? Many phrases of this type exist thanks to alliteration. Perhaps at some time, somewhere, cucumbers were associated with coolness, but, more likely, the simile was coined as a joke: just listen to coo-coo in it!