Is there a keyboard shortcut generating a foreach and also for loop?
You can use Postfix Completion too. Press Ctrl + Alt + S to open the Settings. For example:
int[] list = {1, 2, 3}; list.for -> for(int i : list) {}