In theory, the 401K loan is best, because you're paying yourself back with interest.
I've done it in the past, multiple times, and it was quick and easy.
The caveat, here, is knowing your job stability. I was laid off with an outstanding loan balance. That loan suddenly turned into taxable income that was also subject to penalties because it also changed from "loan" to "withdrawal."
When Uncle Sam came knocking, it was not pretty ... at all.