Australian police say they have foiled a large-scale terrorist attack , with at least 16 arrests in Melbourne and Sydney .