If you are arrested, can your messages be read and your contacts be retrieved by demand of the police? If so, under what circumstances and caveats?
Yes. The police have the power to seize your phone as evidence under the Police and Criminal Evidence Act 1984, the Misuse of Drugs Act 1971, and the Terrorism Act 2000. There are no caveats or defined circumstances other than having a reasonable belief that the data on the phone forms evidence against you.
They do not require a warrant to access your phone, and many police forces in the UK are using commercially available software to bypass password/PIN protection on your phone 1.
In the event you do not provide your password/thumbprint/facial scan/PIN to officers to unlock your phone, you can be served with a Section 49 Notice under the Regulation of Investigatory Powers Act 2000 (RIPA) which compels you to provide that information. Failure to do so can lead to a conviction under Section 53 RIPA, in addition to any other offences you may be charged with.