“unless you are being charged with a crime and arrested, they have no right to ID you.”
Wrong. They can detain and request ID on reasonable suspicion that you have committed a crime.
you are only partially right. They have to explain to you as they are doing it that you are being detained and why. Typically, this is the charged and arrested part. They can detain you without arresting you but they have a small time window to charge you and make it an official arrest. They cannot detain you because you refuse to show them ID. If they cannot or will not say you are being detained and why then they cannot require identification. At least in Ohio. Other states may have other laws, but read up on Habeus Corpus, miranda rights, etc. Interesting stuff.