Convert rid array to a keyed array.