reindex

Generate a lookup table from an array