Custom post type slideshow background images to insert in a plugin

Try moving your foreach into the script tag, as such :

In the images parameter of your javascript :

 //[...]
 images:[
      <?php

      foreach( $slider_posts as $post )
      {

      $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'home-slide');

      echo '"' . $thumb[0] . '",'; //Assuming images are separated by a comma

      }          

      ?>
 ]

You may need to alter the example a bit to get it working properly.

Meta Example

 foreach( $slider_posts as $post )
 {
      $meta = get_post_meta( $post->ID, 'the-meta-field-name', true ); //replace true with false if you want an array of meta field results
 }