items/tags: simplify code with array_unique()