Dilemma of Populating all the categories in a drop down list

WordPress has a specific function to do what you want, wp_dropdown_categories. By default it will fill the value field of the option with the term id, which would be unique, but there are several other options to choose from, which you can pass as an argument when calling the function.

If that doesn’t satisfy you, you can even make a walker function, which changes the dropdown function completely. An example is found at the bottom of the first link.

So, you can do this with one line in your template file or make it as complex as you might desire.