Long answer. I guessed and extrapolated what you might mean, so this could be off by a mile.
If by "F7 in the key of C major" you mean a style like blues where everything is a dominant-seventh chord, tones are bent, minor and major chords are fused etc., then I don't think you'll be able to fit everything into the functional harmony model. You may be able to identify something like tonic, subdominant and dominant - but even your tonic, when the harmony is at rest, is a dominant-seventh chord, and still nobody expects it to "resolve" anywhere.
If your song is like this
C7 C7 C7 C7 F7 F7 C7 C7 G7 G7 C7 G7
then I don't see any usefulness in thinking about borrowing, relative or parallel this and that, or if something is "from" Bb major. There is no expectation in my mind that the F7 chord would bring any hint of a possible modulation or anything. What comes to scale degrees, during the F7 chord, E is flat. During the C7 chord, B is flat.
Music is culture, and music theories are more or less systematic or formal, or at least established, ways of talking about things that are done or happen in music. Some theories i.e. ways of talking fit certain cultures well. Functional harmony, in the sense that you seem to try to apply it, is a good fit for talking, describing or reasoning about the music of "eighteenth- and nineteenth-century Western composers (what we call the 'common practice') ..."
http://openmusictheory.com/harmonicFunctions.html
... but it is not a universal law of nature or theory like quantum mechanics. Music is humanistic, culture, not natural science. In natural sciences, theories talk about nature. In humanistic sciences, theories talk about what people do. Music theories largely fall in the latter category. There are some simple physical phenomena like sound waves that music is built on, but harmonic styles build on learned expectations.
There is no single unified "theory of harmony" that would be useful for describing all harmonic styles in all cultures. Except maybe some meta-theory, which would be a theory about theories, i.e. talking about ways of talking about music.
So, depending on the style of the song you're describing, there are many ways to answer the question "where did the IV 7 chord come from". Maybe it came from blues? If you think of each harmonic style as a ball game, you need to know the rules of the game before you start saying that one of the players "is" a pitcher or goalkeeper or quarterback. Maybe there is no goalkeeper in this game at all, so chances are that whichever player you try to identify as the goalkeeper, is not one. Maybe in this ball game, not everything is aligned to some diatonic scale grid.
What comes to playing outside, a very important aspect is rhythm. If you play, say, pentatonic lines in a completely different key, your ear will start tracking the notes, trying to see a picture there, because the soloist is clearly telling a story - even though it doesn't align with the expectations given by the backing chords. And then you get an "outside" feeling. But if you don't play the lines very clearly and precisely, then the ear doesn't track the lines so well because the solo notes aren't clearly telling a story. The solo is mumbling something unclear. And then the outside feeling is lost, then you're just playing "wrong". So it's not about what notes you play, it's also about how you play them.