generate_random_id function

Some elements require input id, but this does not need to be specified by the user. Thus we assign random value with prefix where needed.