In a metal box I would use an external antenna. For personal prototyping you can substitute the antenna, but for products there are some caveats, as mentioned in this page:
For metal boxes that you can drill a hole in, I prefer to use a U.FL to SMA adapter that’s long enough to reach the enclosure. The SMA generally is designed for panel/enclosure mounting. I’ve used a SMA dipole antenna in this application. Be careful with the antenna, some requires a RP-SMA connector so make sure you get the right antenna and adapter combination.
And dipole antennas are not covered by the Particle certification of the Boron, so that will be an issue if you are making a product.
As for the other question, if you are using
SYSTEM_THREAD(ENABLED) your code will continue to run if there is no cellular connectivity. But if you are using the default automatic system mode without threading, your code will stop running when not cloud connected.