Simplified logic since we don't need to deal with non-arrays.