It's not like you see on TV, when the person is getting arrested and the police officer or detective is putting the suspect in the back of a patrol car and you hear the police officer, the detective reading the person his or her Miranda rights. That's not how it necessarily works.
A person has their Miranda rights, or those would become invoked, when a person is subject to custodial questioning. What that means is the person is in police custody and they're being questioned. If you're simply being arrested, if you're in the back of a patrol car, if you're not being questioned, you do not have to be read your Miranda rights. You would not necessarily have your Miranda rights at this point.
If the police, whomever it may be, the police officer, the detective, if they're questioning a person while the person is in police custody, that is when they have to read your rights, that is when you would have your Miranda rights. Having an experienced Pennsylvania criminal defense attorney will be your best ally to help you understand and protect your rights and interest.