Use array.min to compute shortest length