High throughput optimisation of functional nanomaterials and composite structures for resistive switching memory