How can you create a script to list Cloud Bigtable instances, Memorystore resources, and Cloud SQL databases within a Google Cloud project, while allowing users to filter results with a custom expression? What is the recommended approach for retrieving this data?