wp_generate_attachment_metadata for non-images files

wp_generate_metatadata() should create metadata for image, video, and audio file types. There is and if/elseif conditional in the source that limits the function to those three. However, the last line is:

return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );

So you could use the wp_generate_attachment_metadata filter to generate the metadata you want. There are plenty of answers here about creating filters, not to mention the Codex.

It is hard to say much more as you don’t specify so much as what kind of “non-image” file you have.