Looking at the ckeditor5 readme, it appears that you need to have the HTML textarea(s) already inserted and then call the create method for each textarea, passing its id as the parameter. I pulled this from the readme:
In your HTML page add an element that CKEditor should replace:
<textarea name="content" id="editor"></textarea>
Load the classic editor build (you can choose between CDN, npm and zip downloads):
<script src="https://cdn.ckeditor.com/ckeditor5/<version>/classic/ckeditor.js"></script>
Call the ClassicEditor.create() method:
<script>
ClassicEditor .create(
document.querySelector( '#editor' )
) .catch( error => { console.error( error ); } );
</script>
You’re ready to go!
So, following those instructions, you should be able to call create for each textarea, in your loop, as long as it's been added to the document before you call create().
Edit: If you really want to use an older version of ckeditor, it looks like a previous question mentions using .replace() or .replaceClass()