Optimality of entanglement witnesses constructed from arbitrary permutations