Were the authors of the Old Testament inspired by the Holy Spirit? If so, does that mean the Holy Spirit came to live in humans long before Jesus' crucifixion?
The first part of this question asks if the biblical writers of the Old Testament were inspired by the Holy Spirit. The answer is that they absolutely were indeed divinely inspired and this is easily provable from various passages which speak of this. (See 2 Timothy 3:16 and 2 Peter 1:20-21)
With that in mind, the second part of the question is: does that mean the Holy Spirit lived in them as He lives in us today?
The quick answer is no. The relationship of the Holy Spirit to the believer is different from Old Testament to New. This is because under the Old Covenant, the sins of the believer had been left unpunished (Romans 3:25) and instead of the Holy Spirit coming "in" to dwell within, He instead came "upon" individuals to empower and strengthen.
As Jesus spoke of the coming of the Holy Spirit which would take place after His death and resurrection, note in the passage below how carefully He used certain words to describe the relationship of the Spirit to the believer:
And I will ask the Father, and he will give you another Counselor to be with you forever—the Spirit of truth. The world cannot accept him, because it neither sees him nor knows him. But you know him, for he lives with you and will be in you. John 14:16-17 (NIV)
Jesus speaks of the Holy Spirit as currently being with them, but who very soon will be in them. Once again, this act of coming to live within the believer did not take place until after Christ’s resurrection. Before Christ’s death, the Spirit was merely with or upon people, which is different from coming in. (See John 20:21-22)
So, no, I do not believe that the Holy Spirit came to indwell anyone prior to Christ’s substitutionary death on the cross. But indwelling really isn’t necessary for divine inspiration to take place. An individual can still be divinely inspired, even without the indwelling work of the Spirit.
Check out this passage.Word came to Saul: "David is in Naioth at Ramah"; so he sent men to capture him. But when they saw a group of prophets prophesying, with Samuel standing there as their leader, the Spirit of God came upon Saul's men and they also prophesied.
1 Samuel 19:19-20 (NIV)
Over and over again in the Old Testament the Spirit is said to come “upon” an individual. This happens repeatedly in the book of Judges, 1 Samuel and elsewhere. And this was all that was really needed for divine inspiration to take place.
So, in summary, in the Old Testament, divine inspiration took place by the Holy Spirit coming alongside (with) or upon an individual. But after Christ died on the cross to pay the penalty of our sin, our hearts became a suitable host for the His presence to indwell by faith, because we have now been cleansed by His precious blood.