how to change value return by _stock_status

You can use the code update_post_meta( get_the_ID(), '_stock_status',$value) to change the value of the meta. Please place the above line in the code where you want to change the status value and remember $value is the variable/array/object you can place any string/array/object in it.