I know this might be a simple question but can someone explain to me how to query the WP database and pull in all the "meta_key" and "meta_value" from "post_id" into an array? I have looked at code and tutorials but I still cant figure out how to make it work correctly.
You can use
get_post_meta( $post_id ) to retrieve all of the meta for a post. It will give you more than you need but you can filter it out after.
Here is the code reference - https://developer.wordpress.org/reference/functions/get_post_meta/