Simple utility for reindexing an array as a hash, using a specified id field