Update fetch_array

Makes fetch_array get a second parameter to determine which format to return.