A bit of a strange idea. Why not use permutations? for example, you have a set of values ββ[0-9a-z] when generating the first identifier. you take the first permutation in lexicographical order. then second, etc. to make it seem less guessed, you can change the rules of the lexicographical order. let's say "a" comes after "t" or something like that. you can use a tuple instead of full permutations. This will ensure no collisions.
Actually this idea represents a two-way hash function. basically, if you can somehow encode the number "1" to get something like "q8d3dw" and be able to decode "q8d3dw" to "1", you can be sure that this function will give you unique lines for all values ββfrom 1 to 36 ^ 6.
The problem is choosing this feature. An easy way would be to associate β1β with β000000β, β2β and β000001β, β12β - β00000bβ. Basically arrange all the available lines in lexicographical order and select the line at the position that is id. This, however, is very easy to guess. So what you can do is artificially change the rules of the lexicographical order. Say instead of the usual order (0,1,2,3 ... a, b, c ... x, y, z), you can shuffle it a bit and get something like (a, 5, t, 3. ..). This will lead to slightly more confusing results. However, he will still be completely guessed, because the first element will be "aaaaaa", the second "aaaaa5", then "aaaaat". Thus, you can even more change the rules of the lexicographic order, making them dependent on the position of the character. Say the order for the first char id (a, 5, t, 3 ...) for the second (y, 7.3, r ...), etc.
Now I will not publish pseudo-code, as it will be quite long. And I do not advise you to go this route if you are not interested in creating such kind of algorithms for entertainment :). However, if you go with this route, it can be a very efficient way to generate this identifier without the chance of a collision. And I advise you to read Volume 4, The Art of Computer Programming, by Dr. Donald Knuth. There are many suggestions for implementing such algorithms.