JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" name="text_box" id="text_box" value="content" /> <input type="button" name="submit_button" id="submit_button" value="Submit" />
<div id="paragraphs"></div>

JavaScript

// You have to define your paragraphs arrays. You can define as many as you wish. I've used just 2 of them because of your mentions.
var paragraphs = [
    ['This is my first paragraph content of the first array', 'This is my second paragraph content of the first array', 'This is my third paragraph content of the first array'],
    ['This is my first paragraph content of the second array', 'This is my second paragraph content of the second array', 'This is my third paragraph content of the second array']
],
// define the variable which will store what user has typed
text_box_value,
// in this element will be appended the random texts
paragraphs_container = '#paragraphs';

// when DOM is ready
$(document).ready(function(){
    // Add keyup event listener for input#text_box
    $('input#text_box').keyup(function(){
        // Assign typed in value to the text_box_value variable
        text_box_value = $(this).val();    
    });
    
    // Add click event listener to the submit button
    $('input#submit_button').click(function(){
        // assign paragraphs values to unused_paragraphs
        if(typeof unused_paragraphs == "undefined") {
            var unused_paragraphs = paragraphs.slice(0);
        }
        
        for(var i = 0; i < unused_paragraphs.length; i++) {
            if(unused_paragraphs[i].length == 0)
                unused_paragraphs[i] = paragraphs[i].slice(0);
                
            while(unused_paragraphs[i].length != 0) {
                var rand = Math.floor(Math.random() * unused_paragraphs[i].length);
                if(unused_paragraphs[i][rand].search(text_box_value) !== -1) {
                    $(paragraphs_container).append('<p>' + unused_paragraphs[i][rand] + '</p>');
                    unused_paragraphs[i].splice(rand, 1);
                    break;
                }
                
                unused_paragraphs[i].splice(rand, 1);
            
            }    
        }
        
       ...