Periodic arrays of intercalated atoms in twisted bilayer graphene: An ab initio investigation