Fixing array processing for empty arrays.
Added array_empty tests.