Fix some signed vs. unsigned issues in array and vector handling.