Prevent mixed types in arrays