A criminal can be arrested without a warrant, as long as there is probable cause. In the opening scene, there was the existence of illegal drugs in a quantity sufficient to imply distribution, which could be considered probably cause.
Captain Hill, the (former) Chief of Police fired all of the cops that were not on Diaz's payroll, however, she had been terminated by the Mayor, "effective immediately." and therefore had no authority to dismiss any members of the force. Additionally, having removed all members of the force who were not corrupt, she essentially identified all those who are corrupt.