A few array related problems