XX如YY[adj] 如 [n] / 其XX如YY其 [adj] 如 [n] (more idiomatic, usually contains four characters)
有如XX般YY有如 [n] 般 [adj] / 如XX般YY如 [n] 般 [adj] (more literary)
跟XX一般YY跟 [n] 一般 [adj] / 像XX一樣YY像 [n] 一樣 [adj] (more colloquial)
XX得跟YY一般[adj] 得跟 [n] 一般 / XX得像YY一樣[adj] 得像 [n] 一樣 (even more colloquial)
Example:
1a. 蠢如豬牛 - stupid like a pig or a cow
1b. 兇狠如狼 - vicious like a wolf
(蠢如豬,狠如狼 is more classical)
1c. 其蠢如豬 - stupidness like a pig's
1d. 其狠如狼 - viciousness like a wolf's
2a. 如豬牛般愚蠢 - as stupid as a pig or a cow
2b. 如豺狼般兇狠 - as vicious as a wolf
3a. 跟豬牛一般愚蠢 - as stupid as a pig or a cow
3b. 像豺狼一樣兇狠 - vicious like a wolf
4a. 愚蠢得跟豬牛一般 (so foolish that it is like a pig or a cow)
4b. 兇狠得像豺狼一樣 (so vicious that it is like a wolf)
Another example:
艷如桃李,冷若冰霜 (beautiful like peach and plum blossoms, cold like ice and forse)
快若奔馬,疾似流星 (fast like a running horse, quick like a shooting star)