Many pods/nodes accessing the same PV is not as easy as it looks. If I understand your use case correctly and based on your use case, first of all, your k8s cluster needs a underlying supporting filesystem, such as NFS/EFS, ..etc. that creates a shared storage among K8s nodes. Once you have an available shared storage, sounds like you need a ReadWriteMany access mode, so that different pods of the same deployment can mount the same PV (folder on NFS/EFS) system.
Note: Kubernetes uses volume access modes to match PersistentVolumeClaims and PersistentVolumes. In some cases, the volume access modes also constrain where the PersistentVolume can be mounted. Volume access modes do not enforce write protection once the storage has been mounted. Even if the access modes are specified as ReadWriteOnce, ReadOnlyMany, or ReadWriteMany, they don't set any constraints on the volume.
Then you can create files based on Pod name since in Deployment, Pod names are hashes. However, in a micro service world, you should try to avoid such use cases or find better alternatives to make your design scalable, stateless to a possible extend. For example, use an external DB or service instead of building solutions around underlying storage.