Efficient Implementation of Finite Element Methods on Nonmatching and Overlapping Meshes in Three Dimensions