Total electrification of large-scale nanophotonic arrays by frictional charges