Neither the ark of the covenant nor the temple of Solomon housed God in a literal, confining sense. God is both infinite and omnipresent. As the martyr Stephen declared. “The Most High doesn’t live in temples made by human hands” (Acts 7:48. Acts 17:24).
The ark (as it rested within the Holy of Holies inside the temple) served as a place where the leaders of Israel could meet with God, primarily to bring offerings that would atone for the nation’s sin. God’s presence did indeed fill the temple, much as He now fills believers with His Spirit. For this reason, under the new covenant, Christians are called the “temple of God.”
NUMBERS 10:23 – And they departed from the mount of the Lord three days’ journey: and the ark of the covenant of the Lord went before them in the three days’ journey, to search out a resting place for them.