generate unique slug by appending index to existing slug