How do i keep groups names and IDs into an assortment in Wordpress?

Do this,

 $cat = array();
 $category_ids = get_all_category_ids();
   foreach($category_ids as $cat_id) {
     $cat[]['id'] = $cat_id;
     $cat[]['name'] = get_cat_name($cat_id);
   }

get_categories() provides you with an assortment to utilize, and you will use PHP array functions to slice up since you need to.

http://codex.wordpress.org/Function_Reference/get_categories