If I Am Arrested Do the Police Have to Read Me My Rights?
Miranda has nothing to do with the legality of the arrest.
Miranda concerns statements made after an arrest, not before.
If you make a statement to the police before the arrest, it is considered voluntary. A voluntary statement can be used in court.