There is a common misconception about Miranda rights. Miranda rights attach when you are under interrogation and not necessarily when you are arrested. That’s why it’s important when you’re talking to a cop to ask him whether you are free to leave. Because if you’re free to leave, there’s no rights under Miranda. (Anything comes out that can be used in court.)
But once you’re under interrogation, once you’re detained and under interrogation, that’s when Miranda applies. And if they don’t read your rights, you can get those statements– and usually they come in the form of a confession. You can get those suppressed.